(svn r6740) -Fix: if a rail is not available, don't show toolbar even with hotkey 'A'
This commit is contained in:
		@@ -590,6 +590,7 @@ void ShowBuildRailToolbar(RailType railtype, int button)
 | 
				
			|||||||
	Window *w;
 | 
						Window *w;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (_current_player == OWNER_SPECTATOR) return;
 | 
						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.
 | 
						// 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) {
 | 
						if (button < 0 || !(w = FindWindowById(WC_BUILD_TOOLBAR, 0)) || w->wndproc != BuildRailToolbWndProc) {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user