mirror of
https://github.com/gwm17/glfw.git
synced 2024-11-23 02:38:52 -05:00
Fixed potential clearing of wrong context.
This commit is contained in:
parent
550b0c177d
commit
c1dcd29c71
|
@ -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…
Reference in New Issue
Block a user