mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 23:32:09 +00:00
cleanup the shutdown list in a manner that won't cause problems in a nested shutdown
This commit is contained in:
parent
1e6bc5f0a3
commit
20b8dced56
1 changed files with 5 additions and 5 deletions
|
@ -387,12 +387,12 @@ Sys_Init_Cvars (void)
|
|||
void
|
||||
Sys_Shutdown (void)
|
||||
{
|
||||
shutdown_list_t *p = shutdown_list, *t;
|
||||
shutdown_list_t *t;
|
||||
|
||||
while (p) {
|
||||
p->func ();
|
||||
t = p;
|
||||
p = p->next;
|
||||
while (shutdown_list) {
|
||||
shutdown_list->func ();
|
||||
t = shutdown_list;
|
||||
shutdown_list = shutdown_list->next;
|
||||
free (t);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue