X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8ab43d1ba8ac134b4b077261e68f1051d089c67d..a9efc294a979fb4ae801f7dc37af35677301212d:/src/univ/dialog.cpp diff --git a/src/univ/dialog.cpp b/src/univ/dialog.cpp index ad510bd277..c98a5e91ac 100644 --- a/src/univ/dialog.cpp +++ b/src/univ/dialog.cpp @@ -53,6 +53,11 @@ void wxDialog::Init() wxDialog::~wxDialog() { + m_isBeingDeleted = true; + + // if the dialog is modal, this will end its event loop + Show(false); + delete m_eventLoop; }