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 release];
window->NSGL.pixelFormat = nil; window->NSGL.pixelFormat = nil;
[NSOpenGLContext clearCurrentContext]; if ([NSOpenGLContext currentContext] == window->NSGL.context)
[NSOpenGLContext clearCurrentContext];
[window->NSGL.context release]; [window->NSGL.context release];
window->NSGL.context = nil; window->NSGL.context = nil;