diff --git a/src/monitor.c b/src/monitor.c index 7a70676e..97aa9ba6 100644 --- a/src/monitor.c +++ b/src/monitor.c @@ -78,11 +78,12 @@ static int compareVideoModes(const void* firstPtr, const void* secondPtr) static int refreshVideoModes(_GLFWmonitor* monitor) { int modeCount; + GLFWvidmode* modes; if (monitor->modes) return GL_TRUE; - GLFWvidmode* modes = _glfwPlatformGetVideoModes(monitor, &modeCount); + modes = _glfwPlatformGetVideoModes(monitor, &modeCount); if (!modes) return GL_FALSE;