diff --git a/neo/d3xp/Game_local.cpp b/neo/d3xp/Game_local.cpp index cdf05d86..39fc5598 100644 --- a/neo/d3xp/Game_local.cpp +++ b/neo/d3xp/Game_local.cpp @@ -1715,6 +1715,18 @@ void idGameLocal::MapShutdown() gameRenderWorld->DebugClearPolygons( 0 ); } + // RB: kill ingame editors to prevent crashes during shutdown + if( com_editors != 0 ) + { + com_editors = 0; + g_editEntityMode.SetInteger( 0 ); + + // turn off light debug drawing in the render backend + r_singleLight.SetInteger( -1 ); + r_showLights.SetInteger( 0 ); + } + // RB end + // clear out camera if we're in a cinematic if( inCinematic ) { diff --git a/neo/tools/imgui/ImGuiTools.cpp b/neo/tools/imgui/ImGuiTools.cpp index 0bfee222..04af9ddd 100644 --- a/neo/tools/imgui/ImGuiTools.cpp +++ b/neo/tools/imgui/ImGuiTools.cpp @@ -74,6 +74,11 @@ bool ReleaseMouseForTools() void DrawToolWindows() { + if( !AreEditorsActive() ) + { + return; + } + if( LightEditor::Instance().IsShown() ) { LightEditor::Instance().Draw();