]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/dialog.cpp
fixed compilation for strict ANSI compilers
[wxWidgets.git] / src / gtk1 / dialog.cpp
index d1d13da9b38e604f0ec46147ac8ff66f683e4aae..68a991a37175a6f41c79feb1dc5e053114eb683f 100644 (file)
@@ -198,7 +198,10 @@ int wxDialog::ShowModal()
     if ( !GetParent() && !(GetWindowStyleFlag() & wxDIALOG_NO_PARENT) )
     {
         wxWindow *parent = wxTheApp->GetTopWindow();
-        if ( parent && parent != this )
+        if ( parent &&
+                parent != this &&
+                    parent->IsBeingDeleted() &&
+                        !(parent->GetExtraStyle() & wxWS_EX_TRANSIENT) )
         {
             m_parent = parent;
             gtk_window_set_transient_for( GTK_WINDOW(m_widget), GTK_WINDOW(parent->m_widget) );