From: Brian Paul Date: Wed, 17 Jun 2009 14:34:24 +0000 (-0600) Subject: mesa: added null ptr check in Fake_glXCreatePixmap() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d18c57aaeac37cde0cb551191ecd3c3a56a0ffba;p=mesa.git mesa: added null ptr check in Fake_glXCreatePixmap() Fixes segfault in progs/xdemos/glxgears_pixmap.c --- diff --git a/src/mesa/drivers/x11/fakeglx.c b/src/mesa/drivers/x11/fakeglx.c index 3b004a3ee25..34e0b8bc8d7 100644 --- a/src/mesa/drivers/x11/fakeglx.c +++ b/src/mesa/drivers/x11/fakeglx.c @@ -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++;