diff --git a/src/p_setup.cpp b/src/p_setup.cpp index 0c902bd2f9..346a2a5cb0 100644 --- a/src/p_setup.cpp +++ b/src/p_setup.cpp @@ -366,8 +366,8 @@ void FLevelLocals::ClearLevelData() localEventManager->Shutdown(); if (aabbTree) delete aabbTree; aabbTree = nullptr; - screen->SetAABBTree(nullptr); - + if (screen) + screen->SetAABBTree(nullptr); } //==========================================================================