glx: return GL_FALSE from glx_screen_init where applicable.

Return GL_FALSE if we fail to find any fb/visual configs, otherwise we
end up with all sorts of chaos further down the GLX stack.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
This commit is contained in:
Emil Velikov 2016-09-30 11:01:27 +01:00 committed by Emil Velikov
parent e542ed463d
commit 2e9e05dfca

View file

@ -748,8 +748,11 @@ glx_screen_init(struct glx_screen *psc,
psc->dpy = priv->dpy;
psc->display = priv;
getVisualConfigs(psc, priv, screen);
getFBConfigs(psc, priv, screen);
if (!getVisualConfigs(psc, priv, screen))
return GL_FALSE;
if (!getFBConfigs(psc, priv, screen))
return GL_FALSE;
return GL_TRUE;
}