Fix GTK warnings when destroying unattached wxMenuBar.
Reset m_focusWidget to NULL when destroying m_widget in wxMenuBar dtor, otherwise we try to use this already destroyed (because it's the same as m_widget) widget in wxWindow dtor later resulting in critical GTK warnings. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72559 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -68,6 +68,7 @@ wxMenuBar::~wxMenuBar()
|
|||||||
// Work around a probable bug in Ubuntu 12.04 which causes a warning if
|
// Work around a probable bug in Ubuntu 12.04 which causes a warning if
|
||||||
// gtk_widget_destroy() is called on a wxMenuBar attached to a frame
|
// gtk_widget_destroy() is called on a wxMenuBar attached to a frame
|
||||||
GtkWidget* widget = m_widget;
|
GtkWidget* widget = m_widget;
|
||||||
|
m_focusWidget =
|
||||||
m_widget = NULL;
|
m_widget = NULL;
|
||||||
g_object_unref(widget);
|
g_object_unref(widget);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user