summaryrefslogtreecommitdiff
path: root/rail_gui.c
diff options
context:
space:
mode:
authorDarkvater <darkvater@openttd.org>2006-10-11 22:04:46 +0000
committerDarkvater <darkvater@openttd.org>2006-10-11 22:04:46 +0000
commitd6c21e4d7122d1705d58e4b1b97357047cf66cbc (patch)
treed5ccbd71cf57262e9de7cfbf9ee22c8e850934ab /rail_gui.c
parente262669eb609644756a3f6cd9579791651e5b176 (diff)
downloadopenttd-d6c21e4d7122d1705d58e4b1b97357047cf66cbc.tar.xz
(svn r6740) -Fix: if a rail is not available, don't show toolbar even with hotkey 'A'
Diffstat (limited to 'rail_gui.c')
-rw-r--r--rail_gui.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/rail_gui.c b/rail_gui.c
index 313ea819a..2f6136c01 100644
--- a/rail_gui.c
+++ b/rail_gui.c
@@ -590,6 +590,7 @@ void ShowBuildRailToolbar(RailType railtype, int button)
Window *w;
if (_current_player == OWNER_SPECTATOR) return;
+ if (!ValParamRailtype(railtype)) return;
// don't recreate the window if we're clicking on a button and the window exists.
if (button < 0 || !(w = FindWindowById(WC_BUILD_TOOLBAR, 0)) || w->wndproc != BuildRailToolbWndProc) {