From 3705f48688d7d2c8d4ff5f108ff6b56e289d1967 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 17 Jun 2009 08:33:39 -0600 Subject: st/glx: added null ptr check in Fake_glXCreatePixmap() Fixes segfault in progs/xdemos/glxgears_pixmap.c --- src/gallium/state_trackers/glx/xlib/fakeglx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gallium/state_trackers') diff --git a/src/gallium/state_trackers/glx/xlib/fakeglx.c b/src/gallium/state_trackers/glx/xlib/fakeglx.c index 65e7048188..6df4c7d693 100644 --- a/src/gallium/state_trackers/glx/xlib/fakeglx.c +++ b/src/gallium/state_trackers/glx/xlib/fakeglx.c @@ -1817,7 +1817,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++; -- cgit v1.2.3