diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2005-08-25 14:07:06 +0000 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2005-08-25 14:07:06 +0000 |
commit | dd1a9f75dc1d29e3383f27aaa1cf024c83e5c8e2 (patch) | |
tree | 47b5d75dbb0e31a5338d8cdddb67a369cb86f66e /src | |
parent | 7e6553c1aa5f1336c61b4826ba8125d2bf72665f (diff) |
fix segfault in Fake_glXCreatePBuffer(), bug 4235
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/x11/fakeglx.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mesa/drivers/x11/fakeglx.c b/src/mesa/drivers/x11/fakeglx.c index 2cce27d21c..d3213e7089 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; } |