mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-11-04 09:44:35 +00:00
SDL_windowsopengl.c: WGL: Fixed null-pointer dereference crash
Fixes #8968 Fixed crash after594a79c2f9(cherry picked from commita29f37c14a)
This commit is contained in:
@@ -548,11 +548,11 @@ static int WIN_GL_ChoosePixelFormatARB(SDL_VideoDevice *_this, int *iAttribs, fl
|
|||||||
_this->gl_data->wglChoosePixelFormatARB(hdc, iAttribs, fAttribs,
|
_this->gl_data->wglChoosePixelFormatARB(hdc, iAttribs, fAttribs,
|
||||||
1, &pixel_format,
|
1, &pixel_format,
|
||||||
&matching);
|
&matching);
|
||||||
}
|
|
||||||
|
|
||||||
/* Check whether we actually got an SRGB capable buffer */
|
/* Check whether we actually got an SRGB capable buffer */
|
||||||
_this->gl_data->wglGetPixelFormatAttribivARB(hdc, pixel_format, 0, 1, &qAttrib, &srgb);
|
_this->gl_data->wglGetPixelFormatAttribivARB(hdc, pixel_format, 0, 1, &qAttrib, &srgb);
|
||||||
_this->gl_config.framebuffer_srgb_capable = srgb;
|
_this->gl_config.framebuffer_srgb_capable = srgb;
|
||||||
|
}
|
||||||
|
|
||||||
_this->gl_data->wglMakeCurrent(hdc, NULL);
|
_this->gl_data->wglMakeCurrent(hdc, NULL);
|
||||||
_this->gl_data->wglDeleteContext(hglrc);
|
_this->gl_data->wglDeleteContext(hglrc);
|
||||||
|
|||||||
Reference in New Issue
Block a user