From a21c388dd6c7dd0f5630b2a582cbf99cdcfa46d7 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Fri, 6 Aug 2021 15:10:21 +0300 Subject: [PATCH] - destroyed stale thinkers after change level failure https://forum.zdoom.org/viewtopic.php?t=72890 --- src/g_level.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/g_level.cpp b/src/g_level.cpp index 0f85fc144..6468dd29d 100644 --- a/src/g_level.cpp +++ b/src/g_level.cpp @@ -378,6 +378,10 @@ void G_NewInit () if (primaryLevel->FraggleScriptThinker) primaryLevel->FraggleScriptThinker->Destroy(); primaryLevel->FraggleScriptThinker = nullptr; + // Destroy thinkers that may remain after change level failure + // Usually, the list contains just a sentinel when such error occurred + primaryLevel->Thinkers.DestroyThinkersInList(STAT_TRAVELLING); + G_ClearSnapshots (); netgame = false; multiplayer = multiplayernext;