replayhut: fix race condition in M_ResetDemoList freeing the demolist vars
in rare cases this could free the data the thread is currently using so we gotta wait for it to finish first
This commit is contained in:
1 parent
327cca2e8e
commit
e5bbb14ce0
1 file changed
+5
@@ -4809,6 +4809,9 @@ static void M_DrawReplayStartMenu(void)
|
||||
|
||||
void M_ResetDemoList(void)
|
||||
{
|
||||
Lock_search_state();
|
||||
replaynamesloaded = false;
|
||||
|
||||
Z_Free(demolist_all);
|
||||
demolist_all = NULL;
|
||||
|
||||
@@ -4816,6 +4819,8 @@ void M_ResetDemoList(void)
|
||||
demolist = NULL;
|
||||
|
||||
demo.inreplayhut = false;
|
||||
|
||||
Unlock_search_state();
|
||||
}
|
||||
|
||||
static boolean M_QuitReplayHut(void)
|
||||
|
||||
Reference in new issue
Block a user