(svn r6740) -Fix: if a rail is not available, don't show toolbar even with hotkey 'A'
authorDarkvater
Wed, 11 Oct 2006 22:04:46 +0000
changeset 4816 e555e273cf08
parent 4815 d702c4027451
child 4817 116374e1a5f1
(svn r6740) -Fix: if a rail is not available, don't show toolbar even with hotkey 'A'
rail_gui.c
--- a/rail_gui.c	Wed Oct 11 21:20:53 2006 +0000
+++ b/rail_gui.c	Wed Oct 11 22:04:46 2006 +0000
@@ -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) {