mirror of
https://github.com/gwm17/glfw.git
synced 2024-11-23 10:48:51 -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 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;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user