Dont add fbconfigs to array that we didn't allocate for.

This commit is contained in:
Kristian Høgsberg 2007-08-30 13:05:59 -04:00
parent 157eeb5c3b
commit a87e9a3479

View 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++;
}
}
}
}