aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/x11
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2009-06-17 08:34:24 -0600
committerBrian Paul <[email protected]>2009-06-17 08:38:38 -0600
commitd18c57aaeac37cde0cb551191ecd3c3a56a0ffba (patch)
treea7104cb47e868ca2e40e4527603ddffec8bbdc64 /src/mesa/drivers/x11
parent3705f48688d7d2c8d4ff5f108ff6b56e289d1967 (diff)
mesa: added null ptr check in Fake_glXCreatePixmap()
Fixes segfault in progs/xdemos/glxgears_pixmap.c
Diffstat (limited to 'src/mesa/drivers/x11')
-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 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++;