From dc258ecbe0b2c70845754f157caa5de8024c1763 Mon Sep 17 00:00:00 2001 From: Jonathan G Rennison Date: Thu, 27 Jun 2024 21:31:33 +0100 Subject: [PATCH] Fix #12825: Crash when opening road toolbar in scenario editor Due to attempt to access missing road waypoint button --- src/road_gui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/road_gui.cpp b/src/road_gui.cpp index 0c10b97c46..a9a09eb252 100644 --- a/src/road_gui.cpp +++ b/src/road_gui.cpp @@ -825,7 +825,7 @@ struct BuildRoadToolbarWindow : Window { void OnRealtimeTick([[maybe_unused]] uint delta_ms) override { - if (this->IsWidgetLowered(WID_ROT_BUILD_WAYPOINT)) CheckRedrawRoadWaypointCoverage(this); + if (_game_mode == GM_NORMAL && this->IsWidgetLowered(WID_ROT_BUILD_WAYPOINT)) CheckRedrawRoadWaypointCoverage(this); } /**