Fixed potential clearing of wrong context.

master
Camilla Berglund ago%!(EXTRA string=13 years)
parent 550b0c177d
commit c1dcd29c71
  1. 4
      src/cocoa_window.m

@ -969,7 +969,9 @@ void _glfwPlatformDestroyWindow(_GLFWwindow* window)
[window->NSGL.pixelFormat release];
window->NSGL.pixelFormat = nil;
[NSOpenGLContext clearCurrentContext];
if ([NSOpenGLContext currentContext] == window->NSGL.context)
[NSOpenGLContext clearCurrentContext];
[window->NSGL.context release];
window->NSGL.context = nil;

Loading…
Cancel
Save