Idea concerning issue

This commit is contained in:
momo5502 2016-01-16 13:25:39 +01:00
parent 685aeaba12
commit e884ae672a

View File

@ -451,6 +451,7 @@ namespace Components
// So we need to override it in our menu lists and the game's ui context // So we need to override it in our menu lists and the game's ui context
// EDIT: We might also remove the old instances inside RemoveMenu // EDIT: We might also remove the old instances inside RemoveMenu
// EDIT2: Removing old instances without having a menu to replace them with might leave a nullptr // EDIT2: Removing old instances without having a menu to replace them with might leave a nullptr
// EDIT3: Wouldn't it be better to check if the new menu we're trying to load has already been loaded and not was not deallocated and return that one instead of loading a new one?
void Menus::OverrideMenu(Game::menuDef_t *menu) void Menus::OverrideMenu(Game::menuDef_t *menu)
{ {
if (!menu || !menu->window.name) return; if (!menu || !menu->window.name) return;