From 2cc03a144455e0324ce6cca95d112316059a185c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20M=C3=BCller?= Date: Sat, 8 Jul 2023 11:03:11 +0200 Subject: [PATCH] Closes all popup menus when loading map in editor The targets of many popup menus become invalid when loading or creating a new map with the editor hotkeys, so all popup menus have to be closed in this case, otherwise this can cause crashes with several different popups. --- src/game/editor/editor.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/game/editor/editor.cpp b/src/game/editor/editor.cpp index 07ab04d2c..137e998f1 100644 --- a/src/game/editor/editor.cpp +++ b/src/game/editor/editor.cpp @@ -6577,6 +6577,7 @@ void CEditor::RenderMousePointer() void CEditor::Reset(bool CreateDefault) { + UI()->ClosePopupMenus(); m_Map.Clean(); mem_zero(m_apSavedBrushes, sizeof m_apSavedBrushes);