- fixed bad merge of dobjgc.cpp

This commit is contained in:
Christoph Oelckers 2019-01-30 18:22:37 +01:00
parent 3b4ded5694
commit 99d63faea9
1 changed files with 5 additions and 0 deletions

View File

@ -112,6 +112,8 @@
// EXTERNAL DATA DECLARATIONS ---------------------------------------------- // EXTERNAL DATA DECLARATIONS ----------------------------------------------
extern DThinker *NextToThink;
// PUBLIC DATA DEFINITIONS ------------------------------------------------- // PUBLIC DATA DEFINITIONS -------------------------------------------------
namespace GC namespace GC
@ -280,6 +282,7 @@ static void MarkRoot()
Mark(StatusBar); Mark(StatusBar);
M_MarkMenus(); M_MarkMenus();
Mark(DIntermissionController::CurrentIntermission); Mark(DIntermissionController::CurrentIntermission);
Thinkers.MarkRoots();
Mark(E_FirstEventHandler); Mark(E_FirstEventHandler);
Mark(E_LastEventHandler); Mark(E_LastEventHandler);
for (auto Level : AllLevels()) for (auto Level : AllLevels())
@ -297,6 +300,8 @@ static void MarkRoot()
{ {
Level->Mark(); Level->Mark();
} }
// NextToThink must not be freed while thinkers are ticking.
Mark(NextToThink);
// Mark soft roots. // Mark soft roots.
if (SoftRoots != NULL) if (SoftRoots != NULL)
{ {