Fix handling exceptions from wxEVT_CHAR_HOOK handlers in wxMSW
Catch all the exceptions when processing this event from the keyboard hook as they must not escape from it and outside of the application. Closes #19133.
This commit is contained in:
@@ -7184,7 +7184,9 @@ wxKeyboardHook(int nCode, WXWPARAM wParam, WXLPARAM lParam)
|
|||||||
wxEvtHandler * const handler = win ? win->GetEventHandler()
|
wxEvtHandler * const handler = win ? win->GetEventHandler()
|
||||||
: wxTheApp;
|
: wxTheApp;
|
||||||
|
|
||||||
if ( handler && handler->ProcessEvent(event) )
|
// Do not let exceptions propagate out of the hook, it's a
|
||||||
|
// module boundary.
|
||||||
|
if ( handler && handler->SafelyProcessEvent(event) )
|
||||||
{
|
{
|
||||||
if ( !event.IsNextEventAllowed() )
|
if ( !event.IsNextEventAllowed() )
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user