X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4cd4a9ff70cdfdfc054747d7dae6101da3f94c03..b35549525f2a8dd584fdda158829e8406da0541e:/src/generic/dbgrptg.cpp diff --git a/src/generic/dbgrptg.cpp b/src/generic/dbgrptg.cpp index 015f2de519..ba5c797c24 100644 --- a/src/generic/dbgrptg.cpp +++ b/src/generic/dbgrptg.cpp @@ -46,6 +46,7 @@ #ifdef __WXMSW__ #include "wx/evtloop.h" // for SetCriticalWindow() + #include "wx/scopeguard.h" #endif // __WXMSW__ // ---------------------------------------------------------------------------- @@ -517,6 +518,9 @@ bool wxDebugReportPreviewStd::Show(wxDebugReport& dbgrpt) const // 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); + + wxON_BLOCK_EXIT1( wxEventLoop::SetCriticalWindow, + static_cast(NULL) ); #endif // __WXMSW__ return dlg.ShowModal() == wxID_OK && dbgrpt.GetFilesCount() != 0;