X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a9efc294a979fb4ae801f7dc37af35677301212d..f0ccd2cbfa0b4ac110b81626da5a184b650b1080:/src/motif/dialog.cpp diff --git a/src/motif/dialog.cpp b/src/motif/dialog.cpp index 3955a68d45..618c22de04 100644 --- a/src/motif/dialog.cpp +++ b/src/motif/dialog.cpp @@ -181,7 +181,7 @@ void wxDialog::SetModal(bool flag) wxDialog::~wxDialog() { - m_isBeingDeleted = true; + SendDestroyEvent(); // if the dialog is modal, this will end its event loop Show(false); @@ -307,8 +307,7 @@ int wxDialog::ShowModal() // Now process all events in case they get sent to a destroyed dialog wxFlushEvents( display ); - delete m_eventLoop; - m_eventLoop = NULL; + wxDELETE(m_eventLoop); // TODO: is it safe to call this, if the dialog may have been deleted // by now? Probably only if we're using delayed deletion of dialogs.