SDL_windowsopengl.c: WGL: Fixed null-pointer dereference crash

Fixes #8968

Fixed crash after 594a79c2f9
This commit is contained in:
Wohlstand 2024-02-03 10:33:06 +03:00 committed by Sam Lantinga
parent ca01016577
commit a29f37c14a
1 changed files with 4 additions and 4 deletions

View File

@ -549,11 +549,11 @@ static int WIN_GL_ChoosePixelFormatARB(_THIS, int *iAttribs, float *fAttribs)
_this->gl_data->wglChoosePixelFormatARB(hdc, iAttribs, fAttribs,
1, &pixel_format,
&matching);
}
/* Check whether we actually got an SRGB capable buffer */
_this->gl_data->wglGetPixelFormatAttribivARB(hdc, pixel_format, 0, 1, &qAttrib, &srgb);
_this->gl_config.framebuffer_srgb_capable = srgb;
/* Check whether we actually got an SRGB capable buffer */
_this->gl_data->wglGetPixelFormatAttribivARB(hdc, pixel_format, 0, 1, &qAttrib, &srgb);
_this->gl_config.framebuffer_srgb_capable = srgb;
}
_this->gl_data->wglMakeCurrent(hdc, NULL);
_this->gl_data->wglDeleteContext(hglrc);