The variable ctx can be NULL, and it is checked before every sync_context() function call. However, it is not checked in the ExtEscape() function call in which it is trying to get the hdc member variable of ctx.
Signed-off-by: Yutao Meng mengyutao@uniontech.com --- dlls/winex11.drv/opengl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c index 567205f742c..6b179bc5c0d 100644 --- a/dlls/winex11.drv/opengl.c +++ b/dlls/winex11.drv/opengl.c @@ -3372,7 +3372,7 @@ static BOOL WINAPI glxdrv_wglSwapBuffers( HDC hdc )
release_gl_drawable( gl );
- if (escape.gl_drawable) ExtEscape( ctx->hdc, X11DRV_ESCAPE, sizeof(escape), (LPSTR)&escape, 0, NULL ); + if (ctx && escape.gl_drawable) ExtEscape( ctx->hdc, X11DRV_ESCAPE, sizeof(escape), (LPSTR)&escape, 0, NULL ); return TRUE; }