From d18c57aaeac37cde0cb551191ecd3c3a56a0ffba Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 17 Jun 2009 08:34:24 -0600 Subject: [PATCH] mesa: added null ptr check in Fake_glXCreatePixmap() Fixes segfault in progs/xdemos/glxgears_pixmap.c --- src/mesa/drivers/x11/fakeglx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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++; -- 2.30.2