Ignore failures to update the NSGL layer

Fixes #1168
This commit is contained in:
Kovid Goyal 2018-11-22 18:25:22 +05:30
parent 96229becd1
commit b44345d78e
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -599,8 +599,15 @@ static GLFWapplicationshouldhandlereopenfun handle_reopen_callback = NULL;
- (void)updateLayer
{
if (window->context.client != GLFW_NO_API)
[window->context.nsgl.object update];
if (window->context.client != GLFW_NO_API) {
@try {
[window->context.nsgl.object update];
} @catch (NSException *e) {
_glfwInputError(GLFW_PLATFORM_ERROR,
"Failed to update NSGL Context object with error: %s (%s)",
[[e name] UTF8String], [[e reason] UTF8String]);
}
}
_glfwInputWindowDamage(window);
}