mirror of
https://github.com/glfw/glfw.git
synced 2025-10-04 13:46:37 +00:00
null check
Append a code to check a null, because when window is null, it cause an error.
This commit is contained in:
parent
ba1f1f8ee9
commit
11eebe3e49
@ -543,7 +543,7 @@ GLFWAPI void glfwMakeContextCurrent(GLFWwindow* handle)
|
|||||||
|
|
||||||
_GLFW_REQUIRE_INIT();
|
_GLFW_REQUIRE_INIT();
|
||||||
|
|
||||||
if (window->context.api == GLFW_NO_API)
|
if (window != NULL && window->context.api == GLFW_NO_API)
|
||||||
{
|
{
|
||||||
_glfwInputError(GLFW_NO_WINDOW_CONTEXT, NULL);
|
_glfwInputError(GLFW_NO_WINDOW_CONTEXT, NULL);
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user