From: Vadim Zeitlin Date: Fri, 15 Jul 2005 22:59:50 +0000 (+0000) Subject: use wxEventLoop::SetCriticalWindow() to ensure that we don't get more crashes in... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/c707a0d410c403d24764a3eab06c365b92265951 use wxEventLoop::SetCriticalWindow() to ensure that we don't get more crashes in the event handlers while the preview dialog is shown git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34862 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/generic/dbgrptg.cpp b/src/generic/dbgrptg.cpp index 92a3b55c50..efb75d241b 100644 --- a/src/generic/dbgrptg.cpp +++ b/src/generic/dbgrptg.cpp @@ -43,6 +43,10 @@ #include "wx/filedlg.h" #include "wx/valtext.h" +#ifdef __WXMSW__ + #include "wx/evtloop.h" // for SetCriticalWindow() +#endif // __WXMSW__ + // ---------------------------------------------------------------------------- // wxDumpPreviewDlg: simple class for showing ASCII preview of dump files // ---------------------------------------------------------------------------- @@ -484,6 +488,12 @@ bool wxDebugReportPreviewStd::Show(wxDebugReport& dbgrpt) const wxDebugReportDialog dlg(dbgrpt); +#ifdef __WXMSW__ + // before entering the event loop (from ShowModal()), block the event + // handling for all other windows as this could result in more crashes + wxEventLoop::SetCriticalWindow(&dlg); +#endif // __WXMSW__ + return dlg.ShowModal() == wxID_OK && dbgrpt.GetFilesCount() != 0; }