From e884ae672a87bdd608913afe5df3c84880707f9a Mon Sep 17 00:00:00 2001 From: momo5502 Date: Sat, 16 Jan 2016 13:25:39 +0100 Subject: [PATCH] Idea concerning issue --- src/Components/Modules/Menus.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Components/Modules/Menus.cpp b/src/Components/Modules/Menus.cpp index ed6a267f..7be16af3 100644 --- a/src/Components/Modules/Menus.cpp +++ b/src/Components/Modules/Menus.cpp @@ -451,6 +451,7 @@ namespace Components // 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 // 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) { if (!menu || !menu->window.name) return;