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
This commit is contained in:
Vadim Zeitlin
2005-07-15 22:59:50 +00:00
parent a7b7500c4f
commit c707a0d410

View File

@@ -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;
}