X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3aa8e4ea6db0478d3bc862f59f100408bdc8732f..2028c33ab5a39a12bd410ac953731a56ad6377ba:/src/univ/dialog.cpp?ds=inline diff --git a/src/univ/dialog.cpp b/src/univ/dialog.cpp index ad510bd277..f0f3d659c2 100644 --- a/src/univ/dialog.cpp +++ b/src/univ/dialog.cpp @@ -53,6 +53,9 @@ void wxDialog::Init() wxDialog::~wxDialog() { + // if the dialog is modal, this will end its event loop + Show(false); + delete m_eventLoop; } @@ -189,7 +192,7 @@ int wxDialog::ShowModal() m_isShowingModal = true; - wxASSERT_MSG( !m_windowDisabler, _T("disabling windows twice?") ); + wxASSERT_MSG( !m_windowDisabler, wxT("disabling windows twice?") ); #if defined(__WXGTK__) || defined(__WXMGL__) wxBusyCursorSuspender suspender; @@ -207,7 +210,7 @@ int wxDialog::ShowModal() void wxDialog::EndModal(int retCode) { - wxASSERT_MSG( m_eventLoop, _T("wxDialog is not modal") ); + wxASSERT_MSG( m_eventLoop, wxT("wxDialog is not modal") ); SetReturnCode(retCode);