- let M_ClearMenus destroy all open menus so that they can properly deinitialize.

This commit is contained in:
Christoph Oelckers 2017-02-19 16:08:10 +01:00
parent fb52b034b0
commit c0f588e234

View file

@ -766,13 +766,14 @@ void M_Drawer (void)
//
//=============================================================================
void M_ClearMenus ()
void M_ClearMenus()
{
M_DemoNoPlay = false;
if (CurrentMenu != nullptr)
while (CurrentMenu != nullptr)
{
DMenu* parent = CurrentMenu->mParentMenu;
CurrentMenu->Destroy();
CurrentMenu = nullptr;
CurrentMenu = parent;
}
V_SetBorderNeedRefresh();
menuactive = MENU_Off;