summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2009-06-17 08:40:16 -0600
committerBrian Paul <brianp@vmware.com>2009-06-17 08:40:16 -0600
commit6b782231d097f000b8e71c0a0a23a89176d7c3a2 (patch)
tree00cf30a2d92bd88aa7e682686fe8a7a21af553b3
parent2b890c98184c3c21073c327e7dc36c3239169028 (diff)
mesa: added null ptr check in Fake_glXCreatePixmap()
Fixes segfault in progs/xdemos/glxgears_pixmap.c (cherry picked from master, commit d18c57aaeac37cde0cb551191ecd3c3a56a0ffba)
-rw-r--r--src/mesa/drivers/x11/fakeglx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/drivers/x11/fakeglx.c b/src/mesa/drivers/x11/fakeglx.c
index 73fde865e3..09b23a1e12 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++;