glx: Fix glXGetFBConfigFromVisualSGIX.
authorStéphane Marchesin <marcheu@chromium.org>
Fri, 27 May 2011 00:19:03 +0000 (17:19 -0700)
committerBrian Paul <brianp@vmware.com>
Fri, 27 May 2011 17:58:36 +0000 (11:58 -0600)
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 <piman@chromium.org>
Signed-off-by: Stéphane Marchesin <marcheu@chromium.org>
Signed-off-by: Brian Paul <brianp@vmware.com>
src/glx/glxcmds.c

index 012cd79506e2ff8438b7336f1f3d4bb7aafecc12..dbfa0edff9832ce6e66a9b927b5b2780abba1cc4 100644 (file)
@@ -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,