Dont add fbconfigs to array that we didn't allocate for.
authorKristian Høgsberg <krh@redhat.com>
Thu, 30 Aug 2007 17:05:59 +0000 (13:05 -0400)
committerKristian Høgsberg <krh@redhat.com>
Mon, 15 Oct 2007 14:59:06 +0000 (10:59 -0400)
src/glx/x11/glxcmds.c

index 0a49e9458639b20d0a06c37e9a28bb1d581c122e..3e53dca31995de67b669ead277a14ff66a4cd237 100644 (file)
@@ -1678,8 +1678,10 @@ PUBLIC GLXFBConfig *glXGetFBConfigs(Display *dpy, int screen, int *nelements)
            for ( modes = priv->screenConfigs[screen].configs
                  ; modes != NULL
                  ; modes = modes->next ) {
-               config[i] = modes;
-               i++;
+               if ( modes->fbconfigID != GLX_DONT_CARE ) {
+                   config[i] = modes;
+                   i++;
+               }
            }
        }
     }