1
0
Fork 0
mirror of https://github.com/gwm17/glfw.git synced 2024-11-27 04:28:52 -05:00

Allow closing of NULL.

This commit is contained in:
Camilla Berglund 2011-03-08 23:14:42 +01:00
parent d43e0b50d0
commit 849977c7b2

View File

@ -523,6 +523,10 @@ GLFWAPI void glfwCloseWindow(GLFWwindow handle)
_GLFWwindow* window = (_GLFWwindow*) handle;
// Allow closing of NULL (to match the behavior of free)
if (window == NULL)
return;
// Show mouse pointer again (if hidden)
if (window == _glfwLibrary.cursorLockWindow)
glfwEnable(window, GLFW_MOUSE_CURSOR);