[PR #2178] glx: avoid null dereference in validGlxFBConfigForWindow()

PR: https://github.com/X11Libre/xserver/pull/2178
This commit is contained in:
Alan Coopersmith
2026-03-29 12:39:53 -07:00
committed by Enrico Weigelt, metux IT consult
parent dc000f4d60
commit 80bfd26ff4

View File

@@ -133,7 +133,8 @@ validGlxFBConfigForWindow(ClientPtr client, __GLXconfig * config,
BUG_RETURN_VAL(!pVisual, FALSE);
/* 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;