X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3aa8e4ea6db0478d3bc862f59f100408bdc8732f..6362d82b3ed82aa6795e4ad03160820f94c9e4d4:/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; }