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 11:30:05 -0600
commit1fa42650382e3e0efe612d69e491ea8545a00b93 (patch)
treeb3a2ad2f5479908002f84371fb412bf58aa0fe18
parente310e05b147de49c11a45f99ad67268b20ff5549 (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 73fde865e34..09b23a1e129 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++;