mirror of
https://github.com/glfw/glfw.git
synced 2025-04-07 22:43:06 +00:00
Fixed potential clearing of wrong context.
This commit is contained in:
parent
550b0c177d
commit
c1dcd29c71
1 changed files with 3 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue