summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2005-08-25 14:07:06 +0000
committerBrian Paul <[email protected]>2005-08-25 14:07:06 +0000
commitdd1a9f75dc1d29e3383f27aaa1cf024c83e5c8e2 (patch)
tree47b5d75dbb0e31a5338d8cdddb67a369cb86f66e /src/mesa/drivers
parent7e6553c1aa5f1336c61b4826ba8125d2bf72665f (diff)
fix segfault in Fake_glXCreatePBuffer(), bug 4235
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/x11/fakeglx.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mesa/drivers/x11/fakeglx.c b/src/mesa/drivers/x11/fakeglx.c
index 2cce27d21cc..d3213e70898 100644
--- a/src/mesa/drivers/x11/fakeglx.c
+++ b/src/mesa/drivers/x11/fakeglx.c
@@ -2099,7 +2099,10 @@ Fake_glXCreatePbuffer( Display *dpy, GLXFBConfig config,
/* A GLXPbuffer handle must be an X Drawable because that's what
* glXMakeCurrent takes.
*/
- return (GLXPbuffer) xmbuf->frontxrb->pixmap;
+ if (xmbuf)
+ return (GLXPbuffer) xmbuf->frontxrb->pixmap;
+ else
+ return 0;
}