From 973ff494ac6a354977442b3ba6b1f898fc41b10b Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Tue, 14 Sep 2010 00:17:00 +0200 Subject: [PATCH] Oh, right, this is C. --- src/glext.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/glext.c b/src/glext.c index e5078ad5..2407813f 100644 --- a/src/glext.c +++ b/src/glext.c @@ -128,6 +128,7 @@ int _glfwStringInExtensionString(const char* string, GLFWAPI int glfwExtensionSupported(const char* extension) { const GLubyte* extensions; + _GLFWwindow* window; GLubyte* where; GLint count; int i; @@ -138,14 +139,13 @@ GLFWAPI int glfwExtensionSupported(const char* extension) return GL_FALSE; } - if (!_glfwLibrary.currentWindow) + window = _glfwLibrary.currentWindow; + if (!window) { _glfwSetError(GLFW_NO_CURRENT_WINDOW); return GL_FALSE; } - _GLFWwindow* window = _glfwLibrary.currentWindow; - // Extension names should not have spaces where = (GLubyte*) strchr(extension, ' '); if (where || *extension == '\0')