From 99d63faea9592db7b5c8493f70effdafee26143e Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 30 Jan 2019 18:22:37 +0100 Subject: [PATCH] - fixed bad merge of dobjgc.cpp --- src/dobjgc.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/dobjgc.cpp b/src/dobjgc.cpp index b49f8f4dc..f9c1e2293 100644 --- a/src/dobjgc.cpp +++ b/src/dobjgc.cpp @@ -112,6 +112,8 @@ // EXTERNAL DATA DECLARATIONS ---------------------------------------------- +extern DThinker *NextToThink; + // PUBLIC DATA DEFINITIONS ------------------------------------------------- namespace GC @@ -280,6 +282,7 @@ static void MarkRoot() Mark(StatusBar); M_MarkMenus(); Mark(DIntermissionController::CurrentIntermission); + Thinkers.MarkRoots(); Mark(E_FirstEventHandler); Mark(E_LastEventHandler); for (auto Level : AllLevels()) @@ -297,6 +300,8 @@ static void MarkRoot() { Level->Mark(); } + // NextToThink must not be freed while thinkers are ticking. + Mark(NextToThink); // Mark soft roots. if (SoftRoots != NULL) {