(svn r6740) -Fix: if a rail is not available, don't show toolbar even with hotkey 'A'

This commit is contained in:
Darkvater 2006-10-11 22:04:46 +00:00
parent e262669eb6
commit d6c21e4d71
1 changed files with 1 additions and 0 deletions

View File

@ -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) {