]> git.mxchange.org Git - flightgear.git/commitdiff
Fix a crash with the native menubar.
authorJames Turner <zakalawe@mac.com>
Sun, 5 Aug 2012 20:30:15 +0000 (21:30 +0100)
committerJames Turner <zakalawe@mac.com>
Sun, 5 Aug 2012 20:30:15 +0000 (21:30 +0100)
http://code.google.com/p/flightgear-bugs/issues/detail?id=821

src/GUI/FGPUIMenuBar.cxx

index 0f62285a1e11c897d8fbe5957b0a587d5f33c6db..5e1a31760e1e0e60af713551391833a04a64888e 100644 (file)
@@ -76,8 +76,6 @@ menu_callback (puObject * object)
     mb->fireItem(object);
 }
 
-
-\f
 ////////////////////////////////////////////////////////////////////////
 // Implementation of FGPUIMenuBar.
 ////////////////////////////////////////////////////////////////////////
@@ -98,6 +96,8 @@ void
 FGPUIMenuBar::init ()
 {
     delete _menuBar;            // FIXME: check if PUI owns the pointer
+    _menuBar = NULL;
+  
     make_menubar();
                                 // FIXME: temporary commands to get at
                                 // old, hard-coded dialogs.