mesa: added null ptr check in Fake_glXCreatePixmap()
authorBrian Paul <brianp@vmware.com>
Wed, 17 Jun 2009 14:34:24 +0000 (08:34 -0600)
committerBrian Paul <brianp@vmware.com>
Wed, 17 Jun 2009 14:38:38 +0000 (08:38 -0600)
Fixes segfault in progs/xdemos/glxgears_pixmap.c

src/mesa/drivers/x11/fakeglx.c

index 3b004a3ee258c1aa120ac629a0ce6c0a3d71afe1..34e0b8bc8d777c00e90b356384798027eaa8c1a0 100644 (file)
@@ -2218,7 +2218,7 @@ Fake_glXCreatePixmap( Display *dpy, GLXFBConfig config, Pixmap pixmap,
    if (!dpy || !config || !pixmap)
       return 0;
 
-   for (attr = attribList; *attr; attr++) {
+   for (attr = attribList; attr && *attr; attr++) {
       switch (*attr) {
       case GLX_TEXTURE_FORMAT_EXT:
          attr++;