From d717c0a5bab57300754c7e0739e2246f0801847a Mon Sep 17 00:00:00 2001
From: Camilla Berglund
Date: Mon, 7 May 2012 00:13:38 +0200
Subject: [PATCH] Added bug fix from 2.7.6.
---
readme.html | 1 +
src/win32_window.c | 6 ++++++
2 files changed, 7 insertions(+)
diff --git a/readme.html b/readme.html
index 413be001..e1b29330 100644
--- a/readme.html
+++ b/readme.html
@@ -341,6 +341,7 @@ version of GLFW.
[Win32] Bugfix: The array for WGL context attributes was too small and could overflow
[Win32] Bugfix: Alt+F4 hot key was not translated into WM_CLOSE
[Win32] Bugfix: The GLFW_WINDOW_NO_RESIZE
window parameter was always zero
+ [Win32] Bugfix: A test was missing for whether all available pixel formats had been disqualified
v2.7
diff --git a/src/win32_window.c b/src/win32_window.c
index 9e535136..47862622 100644
--- a/src/win32_window.c
+++ b/src/win32_window.c
@@ -298,6 +298,12 @@ static _GLFWfbconfig* getFBConfigs(_GLFWwindow* window, unsigned int* found)
(*found)++;
}
+ if (*found == 0)
+ {
+ free(fbconfigs);
+ return NULL;
+ }
+
return fbconfigs;
}