From e009cbec9e80b93f91244b3d81d850f549018d8b Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 12 Nov 2016 10:17:57 +0100 Subject: [PATCH] - fixed: PClass::StaticShutdown did not remove the class pointers for VM base classes from their class registration entries. --- src/dobjtype.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/dobjtype.cpp b/src/dobjtype.cpp index b7e666fc1..a7d70ca39 100644 --- a/src/dobjtype.cpp +++ b/src/dobjtype.cpp @@ -2731,9 +2731,11 @@ void PClass::StaticShutdown () FAutoSegIterator probe(CRegHead, CRegTail); - while (*++probe != NULL) + while (*++probe != nullptr) { - ((ClassReg *)*probe)->MyClass = NULL; + auto cr = ((ClassReg *)*probe); + cr->MyClass = nullptr; + if (cr->VMExport != nullptr) cr->VMExport->MyClass = nullptr; } }