Fixed: Catch exception when calling [NSApp sendEvent:event] and log it

This commit is contained in:
kervala 2016-10-29 15:52:06 +02:00
parent 92f4377eb4
commit 7b86bca098

View file

@ -442,9 +442,16 @@ void CCocoaEventEmitter::submitEvents(CEventServer& server, bool /* allWins */)
processMessage(event, &server); processMessage(event, &server);
} }
@try
{
// forward the event to the cocoa application // forward the event to the cocoa application
[NSApp sendEvent:event]; [NSApp sendEvent:event];
} }
@catch(NSException *e)
{
nlwarning("Exception when sending event: %s", [[e reason] UTF8String]);
}
}
_server = &server; _server = &server;
} }