From d3e5a3024c99b404f6b318c9579a7faa3c02f7e4 Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Mon, 9 Nov 2015 20:36:42 +0100 Subject: [PATCH] Fix update being called on nil context --- src/cocoa_window.m | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/cocoa_window.m b/src/cocoa_window.m index 600cf1e7..88e63c3b 100644 --- a/src/cocoa_window.m +++ b/src/cocoa_window.m @@ -160,7 +160,8 @@ static int translateKey(unsigned int key) - (void)windowDidResize:(NSNotification *)notification { - [window->nsgl.context update]; + if (window->context.api != GLFW_NO_API) + [window->nsgl.context update]; if (_glfw.cursorWindow == window && window->cursorMode == GLFW_CURSOR_DISABLED) @@ -177,7 +178,8 @@ static int translateKey(unsigned int key) - (void)windowDidMove:(NSNotification *)notification { - [window->nsgl.context update]; + if (window->context.api != GLFW_NO_API) + [window->nsgl.context update]; if (_glfw.cursorWindow == window && window->cursorMode == GLFW_CURSOR_DISABLED)