Changeset - r5907:578987d7f5a5
[Not reviewed]
master
0 1 0
rubidium - 17 years ago 2007-02-02 14:32:23
rubidium@openttd.org
(svn r8533) -Fix: segmentation fault when the toolbar gets removed and you have selected one of the items in a submenu of the toolbar.
1 file changed with 1 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/window.cpp
Show inline comments
 
@@ -1906,24 +1906,25 @@ restart_search:
 
	 * anywhere in the z-array */
 
	FOR_ALL_WINDOWS(wz) {
 
		if ((*wz)->flags4 & WF_STICKY) {
 
			DeleteWindow(*wz);
 
			goto restart_search;
 
		}
 
	}
 
}
 

	
 
/* Delete all always on-top windows to get an empty screen */
 
void HideVitalWindows(void)
 
{
 
	DeleteWindowById(WC_TOOLBAR_MENU, 0);
 
	DeleteWindowById(WC_MAIN_TOOLBAR, 0);
 
	DeleteWindowById(WC_STATUS_BAR, 0);
 
}
 

	
 
int PositionMainToolbar(Window *w)
 
{
 
	DEBUG(misc, 5, "Repositioning Main Toolbar...");
 

	
 
	if (w == NULL || w->window_class != WC_MAIN_TOOLBAR) {
 
		w = FindWindowById(WC_MAIN_TOOLBAR, 0);
 
	}
 

	
0 comments (0 inline, 0 general)