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.
This commit is contained in:
Robert Müller 2023-07-08 11:03:11 +02:00
parent 8de39e769c
commit 2cc03a1444

View file

@ -6577,6 +6577,7 @@ void CEditor::RenderMousePointer()
void CEditor::Reset(bool CreateDefault) void CEditor::Reset(bool CreateDefault)
{ {
UI()->ClosePopupMenus();
m_Map.Clean(); m_Map.Clean();
mem_zero(m_apSavedBrushes, sizeof m_apSavedBrushes); mem_zero(m_apSavedBrushes, sizeof m_apSavedBrushes);