diff --git a/src/d_main.cpp b/src/d_main.cpp index 73dae50c5..af3ab95da 100644 --- a/src/d_main.cpp +++ b/src/d_main.cpp @@ -1010,7 +1010,8 @@ void D_Display () void D_ErrorCleanup () { savegamerestore = false; - screen->Unlock (); + if (screen) + screen->Unlock (); bglobal.RemoveAllBots (true); D_QuitNetGame (); if (demorecording || demoplayback) diff --git a/src/p_setup.cpp b/src/p_setup.cpp index 28050288b..0e3400cb9 100644 --- a/src/p_setup.cpp +++ b/src/p_setup.cpp @@ -3151,7 +3151,8 @@ void P_FreeLevelData () AActor::ClearTIDHashes(); interpolator.ClearInterpolations(); // [RH] Nothing to interpolate on a fresh level. - Renderer->CleanLevelData(); + if (Renderer) + Renderer->CleanLevelData(); FPolyObj::ClearAllSubsectorLinks(); // can't be done as part of the polyobj deletion process. SN_StopAllSequences (); DThinker::DestroyAllThinkers ();