* have everything inside it freed and we do not have to care...
*/
free( window );
+ if ( fgStructure.Window == window ) fgStructure.Window = NULL ;
}
/*
/*
* Destroy the window associated with the menu
*/
+ if ( fgStructure.Window == menu->Window )
+ fgSetWindow ( menu->ParentWindow ) ;
+
fgDestroyWindow ( menu->Window, TRUE ) ;
/*
/*
* Make sure all windows and menus have been deallocated
*/
- while( (window = (SFG_Window *)fgStructure.Windows.First) != NULL )
- fgDestroyWindow( window, TRUE );
-
while( (menu = (SFG_Menu *)fgStructure.Menus.First) != NULL )
fgDestroyMenu( menu );
+
+ while( (window = (SFG_Window *)fgStructure.Windows.First) != NULL )
+ fgDestroyWindow( window, TRUE );
}
/*