]> git.saurik.com Git - wxWidgets.git/commitdiff
fix for GTK assert after r72696, a draw/expose_event signal may also be attached...
authorPaul Cornett <paulcor@bullseye.com>
Mon, 26 Nov 2012 17:53:01 +0000 (17:53 +0000)
committerPaul Cornett <paulcor@bullseye.com>
Mon, 26 Nov 2012 17:53:01 +0000 (17:53 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73026 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/gtk/window.cpp

index ca7409a761f2bb48fca3721e2184c8b293c31034..2fe5fc38baf823f56d220f522f213a85624da271 100644 (file)
@@ -2396,10 +2396,15 @@ wxWindowGTK::~wxWindowGTK()
         g_captureWindow = NULL;
     }
 
-    if (m_widget)
-        GTKDisconnect(m_widget);
-    if (m_wxwindow && m_wxwindow != m_widget)
+    if (m_wxwindow)
+    {
         GTKDisconnect(m_wxwindow);
+        GtkWidget* parent = gtk_widget_get_parent(m_wxwindow);
+        if (parent)
+            GTKDisconnect(parent);
+    }
+    if (m_widget && m_widget != m_wxwindow)
+        GTKDisconnect(m_widget);
 
     // destroy children before destroying this window itself
     DestroyChildren();