diff --git a/src/gtk/dialog.cpp b/src/gtk/dialog.cpp index 9263599ca6..5cd3594dfb 100644 --- a/src/gtk/dialog.cpp +++ b/src/gtk/dialog.cpp @@ -314,6 +314,8 @@ bool wxDialog::Create( wxWindow *parent, wxDialog::~wxDialog() { + Destroy(); + m_isBeingDeleted = TRUE; if ((wxTopLevelWindows.Number() == 0) && diff --git a/src/gtk1/dialog.cpp b/src/gtk1/dialog.cpp index 9263599ca6..5cd3594dfb 100644 --- a/src/gtk1/dialog.cpp +++ b/src/gtk1/dialog.cpp @@ -314,6 +314,8 @@ bool wxDialog::Create( wxWindow *parent, wxDialog::~wxDialog() { + Destroy(); + m_isBeingDeleted = TRUE; if ((wxTopLevelWindows.Number() == 0) &&