From: Brian Paul Date: Wed, 17 Jun 2009 14:33:39 +0000 (-0600) Subject: st/glx: added null ptr check in Fake_glXCreatePixmap() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3705f48688d7d2c8d4ff5f108ff6b56e289d1967;p=mesa.git st/glx: added null ptr check in Fake_glXCreatePixmap() Fixes segfault in progs/xdemos/glxgears_pixmap.c --- diff --git a/src/gallium/state_trackers/glx/xlib/fakeglx.c b/src/gallium/state_trackers/glx/xlib/fakeglx.c index 65e7048188e..6df4c7d6936 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++;