summaryrefslogtreecommitdiffstats
path: root/src/glx
diff options
context:
space:
mode:
authorEmil Velikov <emil.velikov@collabora.com>2016-09-30 11:01:27 +0100
committerEmil Velikov <emil.l.velikov@gmail.com>2016-10-06 15:03:47 +0100
commit2e9e05dfca18c7f09caa40396d6dd4f2b3ddc1d4 (patch)
tree94ba46d4a060d88116db80bb2cdf33fdebbfd50c /src/glx
parente542ed463dd5ae04e730901208344477afdc6a62 (diff)
downloadexternal_mesa3d-2e9e05dfca18c7f09caa40396d6dd4f2b3ddc1d4.zip
external_mesa3d-2e9e05dfca18c7f09caa40396d6dd4f2b3ddc1d4.tar.gz
external_mesa3d-2e9e05dfca18c7f09caa40396d6dd4f2b3ddc1d4.tar.bz2
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>
Diffstat (limited to 'src/glx')
-rw-r--r--src/glx/glxext.c7
1 files changed, 5 insertions, 2 deletions
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;
}