diff --git a/src/wgl_context.c b/src/wgl_context.c index 03732dd3..1f0ac8a1 100644 --- a/src/wgl_context.c +++ b/src/wgl_context.c @@ -383,6 +383,8 @@ static void loadWGLExtensions(void) if (!wglMakeCurrent(dc, rc)) { + wglDeleteContext(rc); + _glfwInputError(GLFW_PLATFORM_ERROR, "WGL: Failed to make context current for WGL extension loading"); return;