From d6c21e4d7122d1705d58e4b1b97357047cf66cbc Mon Sep 17 00:00:00 2001 From: Darkvater Date: Wed, 11 Oct 2006 22:04:46 +0000 Subject: [PATCH] (svn r6740) -Fix: if a rail is not available, don't show toolbar even with hotkey 'A' --- rail_gui.c | 1 + 1 file changed, 1 insertion(+) diff --git a/rail_gui.c b/rail_gui.c index 313ea819a0..2f6136c01c 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) {