changeset 4816:dd7d453b39ad draft

(svn r6740) -Fix: if a rail is not available, don't show toolbar even with hotkey 'A'
author Darkvater <Darkvater@openttd.org>
date Wed, 11 Oct 2006 22:04:46 +0000
parents 7928282c21e6
children e2984d603b59
files rail_gui.c
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/rail_gui.c
+++ b/rail_gui.c
@@ -590,6 +590,7 @@
 	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) {