diff --git a/glfw/context.c b/glfw/context.c index 7fd9ce9f9..e194a2ee1 100644 --- a/glfw/context.c +++ b/glfw/context.c @@ -434,11 +434,11 @@ bool _glfwStringInExtensionString(const char* string, const char* extensions) GLFWAPI void glfwMakeContextCurrent(GLFWwindow* handle) { + _GLFW_REQUIRE_INIT(); + _GLFWwindow* window = (_GLFWwindow*) handle; _GLFWwindow* previous = _glfwPlatformGetTls(&_glfw.contextSlot); - _GLFW_REQUIRE_INIT(); - if (window && window->context.client == GLFW_NO_API) { _glfwInputError(GLFW_NO_WINDOW_CONTEXT,