Only call seterror if the context creation fails

This commit is contained in:
Magnus Norddahl 2020-01-02 20:21:38 +01:00
parent 6450bdcc67
commit 10702928ae

View file

@ -303,8 +303,12 @@ HGLRC OpenGLCreationHelper::CreateContext(HDC hdc, HGLRC share_context)
break;
}
GLenum error = glGetError();
SetError("No OpenGL 3.2 support found: %d", error);
// Grab the error from the last create attempt
if (!opengl3_context)
{
GLenum error = glGetError();
SetError("No OpenGL 3.2 support found: %d", error);
}
}
else
{