From: Stéphane Marchesin Date: Fri, 27 May 2011 00:19:03 +0000 (-0700) Subject: glx: Fix glXGetFBConfigFromVisualSGIX. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=fc48de4fabcf3a42a1cd7d447790afefc7d27af8;p=mesa.git glx: Fix glXGetFBConfigFromVisualSGIX. We want to check for Success, otherwise it will fail even with the right visual. NOTE: This is a candidate for the 7.10 branch. Signed-off-by: Antoine Labour Signed-off-by: Stéphane Marchesin Signed-off-by: Brian Paul --- diff --git a/src/glx/glxcmds.c b/src/glx/glxcmds.c index 012cd79506e..dbfa0edff98 100644 --- a/src/glx/glxcmds.c +++ b/src/glx/glxcmds.c @@ -1890,7 +1890,7 @@ glXGetFBConfigFromVisualSGIX(Display * dpy, XVisualInfo * vis) struct glx_display *priv; struct glx_screen *psc = NULL; - if ((GetGLXPrivScreenConfig(dpy, vis->screen, &priv, &psc) != Success) + if ((GetGLXPrivScreenConfig(dpy, vis->screen, &priv, &psc) == Success) && __glXExtensionBitIsEnabled(psc, SGIX_fbconfig_bit) && (psc->configs->fbconfigID != (int) GLX_DONT_CARE)) { return (GLXFBConfigSGIX) glx_config_find_visual(psc->configs,