summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@redhat.com>2007-08-30 13:05:59 -0400
committerKristian Høgsberg <krh@redhat.com>2007-10-15 10:59:06 -0400
commita87e9a3479aa8fc2d3aab7ee848224418b04bde3 (patch)
tree1adc4670cc7d795c2c11ede78812bed62021850f /src
parent157eeb5c3b1ed16d67247f41e83dad3cda6e31ef (diff)
Dont add fbconfigs to array that we didn't allocate for.
Diffstat (limited to 'src')
-rw-r--r--src/glx/x11/glxcmds.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/glx/x11/glxcmds.c b/src/glx/x11/glxcmds.c
index 0a49e94586..3e53dca319 100644
--- a/src/glx/x11/glxcmds.c
+++ b/src/glx/x11/glxcmds.c
@@ -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++;
+ }
}
}
}