From: James Turner Date: Sun, 5 Aug 2012 20:30:15 +0000 (+0100) Subject: Fix a crash with the native menubar. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=4593c3521f06c67f972f49e68cd9ed138be3e196;p=flightgear.git Fix a crash with the native menubar. http://code.google.com/p/flightgear-bugs/issues/detail?id=821 --- diff --git a/src/GUI/FGPUIMenuBar.cxx b/src/GUI/FGPUIMenuBar.cxx index 0f62285a1..5e1a31760 100644 --- a/src/GUI/FGPUIMenuBar.cxx +++ b/src/GUI/FGPUIMenuBar.cxx @@ -76,8 +76,6 @@ menu_callback (puObject * object) mb->fireItem(object); } - - //////////////////////////////////////////////////////////////////////// // 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.