]> git.saurik.com Git - wxWidgets.git/commitdiff
use wxEventLoop::SetCriticalWindow() to ensure that we don't get more crashes in...
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 15 Jul 2005 22:59:50 +0000 (22:59 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 15 Jul 2005 22:59:50 +0000 (22:59 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34862 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/dbgrptg.cpp

index 92a3b55c502bfe984183573adc78e2256b158e85..efb75d241b0c6c3d9d73433ad15a999cbab2a68d 100644 (file)
 #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;
 }