diff --git a/src/game/game_gui.cpp b/src/game/game_gui.cpp index ca16eeda5b..59d721ff5b 100644 --- a/src/game/game_gui.cpp +++ b/src/game/game_gui.cpp @@ -113,6 +113,7 @@ struct GSConfigWindow : public Window { ~GSConfigWindow() { + HideDropDownMenu(this); DeleteWindowByClass(WC_SCRIPT_LIST); } diff --git a/src/newgrf_gui.cpp b/src/newgrf_gui.cpp index 556db0eaeb..b0953a0bd4 100644 --- a/src/newgrf_gui.cpp +++ b/src/newgrf_gui.cpp @@ -183,6 +183,11 @@ struct NewGRFParametersWindow : public Window { this->InvalidateData(); } + ~NewGRFParametersWindow() + { + HideDropDownMenu(this); + } + /** * Get a dummy parameter-info object with default information. * @param nr The param number that should be changed. diff --git a/src/script/script_gui.cpp b/src/script/script_gui.cpp index 7ccbce795f..3151385760 100644 --- a/src/script/script_gui.cpp +++ b/src/script/script_gui.cpp @@ -325,6 +325,11 @@ struct ScriptSettingsWindow : public Window { this->RebuildVisibleSettings(); } + ~ScriptSettingsWindow() + { + HideDropDownMenu(this); + } + /** * Rebuilds the list of visible settings. AI settings with the flag * AICONFIG_AI_DEVELOPER set will only be visible if the game setting