|
@@ -609,10 +609,12 @@ GLFWbool _glfwStringInExtensionString(const char* string, const char* extensions
|
|
|
GLFWAPI void glfwMakeContextCurrent(GLFWwindow* handle)
|
|
|
{
|
|
|
_GLFWwindow* window = (_GLFWwindow*) handle;
|
|
|
- _GLFWwindow* previous = _glfwPlatformGetTls(&_glfw.contextSlot);
|
|
|
+ _GLFWwindow* previous;
|
|
|
|
|
|
_GLFW_REQUIRE_INIT();
|
|
|
|
|
|
+ previous = _glfwPlatformGetTls(&_glfw.contextSlot);
|
|
|
+
|
|
|
if (window && window->context.client == GLFW_NO_API)
|
|
|
{
|
|
|
_glfwInputError(GLFW_NO_WINDOW_CONTEXT,
|