summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorstormcone <48624099+stormcone@users.noreply.github.com>2020-04-05 19:34:36 +0200
committerGitHub <noreply@github.com>2020-04-05 18:34:36 +0100
commit2514f43909b08c62a9e34703bcdbb89081faef9c (patch)
treeb44cfc6c7420abb26997cd8de007f281542ed436 /src
parent71e79edfc1adaa4ea1e19d6ec87cb045ef7f69fe (diff)
downloadopenttd-2514f43909b08c62a9e34703bcdbb89081faef9c.tar.xz
Fix #8055, c02ef3e: Crash when roadtype availability changed with the road toolbar open (#8058)
Diffstat (limited to 'src')
-rw-r--r--src/road_gui.cpp11
1 files changed, 0 insertions, 11 deletions
diff --git a/src/road_gui.cpp b/src/road_gui.cpp
index ea34102ee..45ab0f6f8 100644
--- a/src/road_gui.cpp
+++ b/src/road_gui.cpp
@@ -305,17 +305,6 @@ struct BuildRoadToolbarWindow : Window {
if (!gui_scope) return;
if (_game_mode != GM_EDITOR && !CanBuildVehicleInfrastructure(VEH_ROAD, GetRoadTramType(this->roadtype))) delete this;
- bool can_build = _game_mode != GM_EDITOR;
- this->SetWidgetsDisabledState(!can_build,
- WID_ROT_DEPOT,
- WID_ROT_BUS_STATION,
- WID_ROT_TRUCK_STATION,
- WIDGET_LIST_END);
- if (!can_build) {
- DeleteWindowById(WC_BUILD_DEPOT, TRANSPORT_ROAD);
- DeleteWindowById(WC_BUS_STATION, TRANSPORT_ROAD);
- DeleteWindowById(WC_TRUCK_STATION, TRANSPORT_ROAD);
- }
}
void Initialize(RoadType roadtype)