diff --git a/src/gtk/dialog.cpp b/src/gtk/dialog.cpp index 8a087ecae6..ebc4506665 100644 --- a/src/gtk/dialog.cpp +++ b/src/gtk/dialog.cpp @@ -82,7 +82,8 @@ wxDialog::~wxDialog() m_isBeingDeleted = true; // if the dialog is modal, this will end its event loop - Show(false); + if ( IsModal() ) + EndModal(wxID_CANCEL); } bool wxDialog::IsModal() const