]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/toplevel.cpp
fixed compilation under Unix where SQL_DATETIME is not defined
[wxWidgets.git] / src / gtk / toplevel.cpp
index 8f33dbd97b0212fd421323b0dd80855f9afad5b5..dbe2a3a928a2ffbae0245a44e33f2b28da7980ff 100644 (file)
@@ -515,7 +515,11 @@ wxTopLevelWindowGTK::~wxTopLevelWindowGTK()
 {
     m_isBeingDeleted = TRUE;
     
-    gtk_window_set_focus( GTK_WINDOW(m_widget), NULL );
+    // it may also be GtkScrolledWindow in the case of an MDI child
+    if (GTK_IS_WINDOW(m_widget))
+    {
+        gtk_window_set_focus( GTK_WINDOW(m_widget), NULL );
+    }
 
     wxTopLevelWindows.DeleteObject( this );