Merge branch 'glx-1817' into 'main'

glx: avoid null dereference in validGlxFBConfigForWindow()

See merge request xorg/xserver!2160
This commit is contained in:
Alan Coopersmith 2026-03-29 13:41:07 -07:00
commit ef887624fd

View file

@ -123,7 +123,8 @@ validGlxFBConfigForWindow(ClientPtr client, __GLXconfig * config,
}
/* FIXME: What exactly should we check here... */
if (pVisual->class != glxConvertToXVisualType(config->visualType) ||
if (pVisual == NULL ||
pVisual->class != glxConvertToXVisualType(config->visualType) ||
!(config->drawableType & GLX_WINDOW_BIT)) {
client->errorValue = pDraw->id;
*err = BadMatch;