mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-14 17:18:09 +00:00
[PR #2178] glx: avoid null dereference in validGlxFBConfigForWindow()
PR: https://github.com/X11Libre/xserver/pull/2178
This commit is contained in:
committed by
Enrico Weigelt, metux IT consult
parent
dc000f4d60
commit
80bfd26ff4
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user