From ec3784f3d78a4b9fc2f1a676bcf1275077e3b0d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Camilla=20L=C3=B6wy?= Date: Thu, 14 Feb 2019 21:48:08 +0100 Subject: [PATCH] WGL: Unify query error handling --- src/wgl_context.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/wgl_context.c b/src/wgl_context.c index ad1ffa55..b3e0303c 100644 --- a/src/wgl_context.c +++ b/src/wgl_context.c @@ -215,7 +215,11 @@ static int choosePixelFormat(_GLFWwindow* window, sizeof(PIXELFORMATDESCRIPTOR), &pfd)) { - continue; + _glfwInputErrorWin32(GLFW_PLATFORM_ERROR, + "WGL: Failed to describe pixel format"); + + free(usableConfigs); + return 0; } if (!(pfd.dwFlags & PFD_DRAW_TO_WINDOW) ||