Catch exceptions from wxEVT_{QUERY_,}END_SESSION handlers too
Similarly to the previous commit, call SafelyProcessEvent() to prevent the exceptions from escaping into MSW. See #19133.
This commit is contained in:
@@ -4217,7 +4217,7 @@ bool wxWindowMSW::HandleQueryEndSession(long logOff, bool *mayEnd)
|
||||
event.SetCanVeto(true);
|
||||
event.SetLoggingOff(logOff == (long)ENDSESSION_LOGOFF);
|
||||
|
||||
bool rc = wxTheApp->ProcessEvent(event);
|
||||
bool rc = wxTheApp->SafelyProcessEvent(event);
|
||||
|
||||
if ( rc )
|
||||
{
|
||||
@@ -4244,7 +4244,7 @@ bool wxWindowMSW::HandleEndSession(bool endSession, long logOff)
|
||||
event.SetCanVeto(false);
|
||||
event.SetLoggingOff((logOff & ENDSESSION_LOGOFF) != 0);
|
||||
|
||||
return wxTheApp->ProcessEvent(event);
|
||||
return wxTheApp->SafelyProcessEvent(event);
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user