X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/dc409d37f2fbd5fec4f8ae2676cfd87dbb479e4f..fe02497d70fb6cbb825f24858d6eaa9c38c5c369:/src/gtk/dialog.cpp diff --git a/src/gtk/dialog.cpp b/src/gtk/dialog.cpp index bb0f74e2ef..ebc4506665 100644 --- a/src/gtk/dialog.cpp +++ b/src/gtk/dialog.cpp @@ -71,11 +71,21 @@ bool wxDialog::Show( bool show ) bool ret = wxWindow::Show( show ); - if (show) InitDialog(); + if (show) + InitDialog(); return ret; } +wxDialog::~wxDialog() +{ + m_isBeingDeleted = true; + + // if the dialog is modal, this will end its event loop + if ( IsModal() ) + EndModal(wxID_CANCEL); +} + bool wxDialog::IsModal() const { return m_modalShowing;