Added missing WGL pixel format error check.

This commit is contained in:
Camilla Berglund 2013-01-16 06:10:09 +01:00
parent f479b1920f
commit 20a4ecf175

View File

@ -293,6 +293,12 @@ int _glfwCreateContext(_GLFWwindow* window,
pfd.cAuxBuffers = fbconfig->auxBuffers;
pixelFormat = ChoosePixelFormat(window->wgl.dc, &pfd);
if (!pixelFormat)
{
_glfwInputError(GLFW_PLATFORM_ERROR,
"WGL: Failed to find a suitable pixel format");
return GL_FALSE;
}
}
if (!DescribePixelFormat(window->wgl.dc, pixelFormat, sizeof(pfd), &pfd))