Fix update being called on nil context

master
Camilla Berglund ago%!(EXTRA string=10 years)
parent 9c315412e1
commit d3e5a3024c
  1. 6
      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)

Loading…
Cancel
Save