mirror of
https://github.com/glfw/glfw.git
synced 2024-11-10 00:51:47 +00:00
Fix potential context resource leaks
There is a gap between the creation of the context and the call to _glfwRefreshContextAttribs.
This commit is contained in:
parent
1d3240ff9c
commit
fcdef1d0a0
@ -1069,7 +1069,7 @@ void _glfwPlatformDestroyWindow(_GLFWwindow* window)
|
|||||||
if (window->monitor)
|
if (window->monitor)
|
||||||
releaseMonitor(window);
|
releaseMonitor(window);
|
||||||
|
|
||||||
if (window->context.client != GLFW_NO_API)
|
if (window->context.destroy)
|
||||||
window->context.destroy(window);
|
window->context.destroy(window);
|
||||||
|
|
||||||
[window->ns.object setDelegate:nil];
|
[window->ns.object setDelegate:nil];
|
||||||
|
@ -396,7 +396,7 @@ void _glfwPlatformDestroyWindow(_GLFWwindow* window)
|
|||||||
window->mir.surface = NULL;
|
window->mir.surface = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (window->context.client != GLFW_NO_API)
|
if (window->context.destroy)
|
||||||
window->context.destroy(window);
|
window->context.destroy(window);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1026,7 +1026,7 @@ void _glfwPlatformDestroyWindow(_GLFWwindow* window)
|
|||||||
if (window->monitor)
|
if (window->monitor)
|
||||||
releaseMonitor(window);
|
releaseMonitor(window);
|
||||||
|
|
||||||
if (window->context.client != GLFW_NO_API)
|
if (window->context.destroy)
|
||||||
window->context.destroy(window);
|
window->context.destroy(window);
|
||||||
|
|
||||||
if (_glfw.win32.disabledCursorWindow == window)
|
if (_glfw.win32.disabledCursorWindow == window)
|
||||||
|
@ -437,7 +437,7 @@ void _glfwPlatformDestroyWindow(_GLFWwindow* window)
|
|||||||
_glfwInputWindowFocus(window, GLFW_FALSE);
|
_glfwInputWindowFocus(window, GLFW_FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (window->context.client != GLFW_NO_API)
|
if (window->context.destroy)
|
||||||
window->context.destroy(window);
|
window->context.destroy(window);
|
||||||
|
|
||||||
if (window->wl.native)
|
if (window->wl.native)
|
||||||
|
@ -1576,7 +1576,7 @@ void _glfwPlatformDestroyWindow(_GLFWwindow* window)
|
|||||||
window->x11.ic = NULL;
|
window->x11.ic = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (window->context.client != GLFW_NO_API)
|
if (window->context.destroy)
|
||||||
window->context.destroy(window);
|
window->context.destroy(window);
|
||||||
|
|
||||||
if (window->x11.handle)
|
if (window->x11.handle)
|
||||||
|
Loading…
Reference in New Issue
Block a user