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:
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user