diff --git a/src/game/editor/editor.cpp b/src/game/editor/editor.cpp index 157cb18a6c7..137e998f135 100644 --- a/src/game/editor/editor.cpp +++ b/src/game/editor/editor.cpp @@ -6577,12 +6577,9 @@ void CEditor::RenderMousePointer() void CEditor::Reset(bool CreateDefault) { + UI()->ClosePopupMenus(); m_Map.Clean(); - //delete undo file - char aBuffer[1024]; - m_pStorage->GetCompletePath(IStorage::TYPE_SAVE, "editor/", aBuffer, sizeof(aBuffer)); - mem_zero(m_apSavedBrushes, sizeof m_apSavedBrushes); // create default layers diff --git a/src/game/editor/popups.cpp b/src/game/editor/popups.cpp index b4ec8ae4034..7584f5a9727 100644 --- a/src/game/editor/popups.cpp +++ b/src/game/editor/popups.cpp @@ -1199,6 +1199,8 @@ CUI::EPopupMenuFunctionResult CEditor::PopupPoint(void *pContext, CUIRect View, { CEditor *pEditor = static_cast(pContext); std::vector vpQuads = pEditor->GetSelectedQuads(); + if(!in_range(pEditor->m_SelectedQuadIndex, 0, vpQuads.size() - 1)) + return CUI::POPUP_CLOSE_CURRENT; CQuad *pCurrentQuad = vpQuads[pEditor->m_SelectedQuadIndex]; enum