Properly clear UI resources when shutting down the UI

This commit is contained in:
smallmodel 2024-12-05 23:31:38 +01:00
parent 115b7b82aa
commit 35f40e949b
No known key found for this signature in database
GPG key ID: 9F2D623CEDF08512
2 changed files with 10 additions and 0 deletions

View file

@ -639,6 +639,14 @@ void MenuManager::DeleteAllMenus
Menu *menu = m_menulist.ObjectAt( i );
delete menu;
}
//
// Added in OPM
// Make sure to clear the menu list and stack
m_menulist.FreeObjectList();
m_menustack.Clear();
m_showmenustack.Clear();
}
Menu *MenuManager::FindMenu

View file

@ -910,6 +910,8 @@ void UIWindowManager::Shutdown(void)
delete b;
}
m_cursor = NULL;
UIWidget::Shutdown();
}