From e2f268db5c09e7a44e747f47dc0a46462e757021 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 26 Sep 2012 22:29:37 +0000 Subject: [PATCH] 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 --- src/gtk/menu.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gtk/menu.cpp b/src/gtk/menu.cpp index f0b8b6ff9e..fe49bc3fa1 100644 --- a/src/gtk/menu.cpp +++ b/src/gtk/menu.cpp @@ -68,6 +68,7 @@ wxMenuBar::~wxMenuBar() // 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 GtkWidget* widget = m_widget; + m_focusWidget = m_widget = NULL; g_object_unref(widget); } -- 2.45.2