1
0
Fork 0
mirror of https://github.com/gwm17/glfw.git synced 2024-10-08 15:17:25 -04:00

Fixed potential clearing of wrong context.

This commit is contained in:
Camilla Berglund 2012-10-21 21:30:13 +02:00
parent 550b0c177d
commit c1dcd29c71

View File

@ -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;