Return NULL if the monitor is not found

This commit is contained in:
Scr3amer 2023-09-26 14:51:54 -04:00 committed by GitHub
parent e8d244387f
commit a98b1877aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -3903,6 +3903,8 @@ GLFWAPI void glfwRequestWindowAttention(GLFWwindow* window);
* The window should not be NULL. * The window should not be NULL.
* *
* @param[in] window The window to query. * @param[in] window The window to query.
* @return The monitor, or `NULL` if the window is NULL or an
* [error](@ref error_handling) occurred.
* *
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED. * @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
* *

View File

@ -1772,7 +1772,7 @@ _GLFWmonitor* _glfwGetMonitorDisplayingWindowWin32(_GLFWwindow* window)
return _glfw.monitors[i]; return _glfw.monitors[i];
} }
return _glfw.monitors[0]; return NULL;
} }
void _glfwFocusWindowWin32(_GLFWwindow* window) void _glfwFocusWindowWin32(_GLFWwindow* window)