diff options
author | Darkvater <darkvater@openttd.org> | 2006-10-11 22:04:46 +0000 |
---|---|---|
committer | Darkvater <darkvater@openttd.org> | 2006-10-11 22:04:46 +0000 |
commit | d6c21e4d7122d1705d58e4b1b97357047cf66cbc (patch) | |
tree | d5ccbd71cf57262e9de7cfbf9ee22c8e850934ab | |
parent | e262669eb609644756a3f6cd9579791651e5b176 (diff) | |
download | openttd-d6c21e4d7122d1705d58e4b1b97357047cf66cbc.tar.xz |
(svn r6740) -Fix: if a rail is not available, don't show toolbar even with hotkey 'A'
-rw-r--r-- | rail_gui.c | 1 |
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) { |