diff --git a/src/gtk/dialog.cpp b/src/gtk/dialog.cpp index 2ff8564b78..75b82b7303 100644 --- a/src/gtk/dialog.cpp +++ b/src/gtk/dialog.cpp @@ -118,7 +118,7 @@ int wxDialog::ShowModal() wxWindow *parent = wxTheApp->GetTopWindow(); if ( parent && parent != this && - parent->IsBeingDeleted() && + !parent->IsBeingDeleted() && !(parent->GetExtraStyle() & wxWS_EX_TRANSIENT) ) { m_parent = parent; diff --git a/src/gtk1/dialog.cpp b/src/gtk1/dialog.cpp index 67f0984c08..5a1129b0e2 100644 --- a/src/gtk1/dialog.cpp +++ b/src/gtk1/dialog.cpp @@ -194,7 +194,7 @@ int wxDialog::ShowModal() wxWindow *parent = wxTheApp->GetTopWindow(); if ( parent && parent != this && - parent->IsBeingDeleted() && + !parent->IsBeingDeleted() && !(parent->GetExtraStyle() & wxWS_EX_TRANSIENT) ) { m_parent = parent;