From: Emil Velikov Date: Fri, 30 Sep 2016 10:01:27 +0000 (+0100) Subject: glx: return GL_FALSE from glx_screen_init where applicable. X-Git-Tag: upstream/17.1.0~5902 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2e9e05dfca18c7f09caa40396d6dd4f2b3ddc1d4;p=platform%2Fupstream%2Fmesa.git 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 Reviewed-by: Marek Olšák Reviewed-by: Ian Romanick --- diff --git a/src/glx/glxext.c b/src/glx/glxext.c index f6bc377..9ef7ff5 100644 --- a/src/glx/glxext.c +++ b/src/glx/glxext.c @@ -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; }