From 1e5029563cb68e53e41299a5d92e317566d7ba66 Mon Sep 17 00:00:00 2001 From: stormcone <48624099+stormcone@users.noreply.github.com> Date: Fri, 12 Jul 2019 21:43:58 +0200 Subject: Fix #7635: Game crash on exit scenario editor. --- src/dock_gui.cpp | 2 +- src/road_gui.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dock_gui.cpp b/src/dock_gui.cpp index 785bbc5fb..7fdaa1d8f 100644 --- a/src/dock_gui.cpp +++ b/src/dock_gui.cpp @@ -105,7 +105,7 @@ struct BuildDocksToolbarWindow : Window { ~BuildDocksToolbarWindow() { - if (_game_mode != GM_EDITOR && this->IsWidgetLowered(WID_DT_STATION)) SetViewportCatchmentStation(nullptr, true); + if (_game_mode == GM_NORMAL && this->IsWidgetLowered(WID_DT_STATION)) SetViewportCatchmentStation(nullptr, true); if (_settings_client.gui.link_terraform_toolbar) DeleteWindowById(WC_SCEN_LAND_GEN, 0, false); } diff --git a/src/road_gui.cpp b/src/road_gui.cpp index 9a35147e5..5301b6a2e 100644 --- a/src/road_gui.cpp +++ b/src/road_gui.cpp @@ -293,7 +293,7 @@ struct BuildRoadToolbarWindow : Window { ~BuildRoadToolbarWindow() { - if (_game_mode != GM_EDITOR && (this->IsWidgetLowered(WID_ROT_BUS_STATION) || this->IsWidgetLowered(WID_ROT_TRUCK_STATION))) SetViewportCatchmentStation(nullptr, true); + if (_game_mode == GM_NORMAL && (this->IsWidgetLowered(WID_ROT_BUS_STATION) || this->IsWidgetLowered(WID_ROT_TRUCK_STATION))) SetViewportCatchmentStation(nullptr, true); if (_settings_client.gui.link_terraform_toolbar) DeleteWindowById(WC_SCEN_LAND_GEN, 0, false); } -- cgit v1.2.3-70-g09d2