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

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

View File

@@ -127,7 +127,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;