mirror of
https://github.com/glfw/glfw.git
synced 2026-09-22 08:50:15 +00:00
Fixed potential clearing of wrong context.
This commit is contained in:
+3
-1
@@ -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;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user