From: Brian Paul Date: Thu, 25 Aug 2005 14:07:06 +0000 (+0000) Subject: fix segfault in Fake_glXCreatePBuffer(), bug 4235 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=dd1a9f75dc1d29e3383f27aaa1cf024c83e5c8e2;p=mesa.git fix segfault in Fake_glXCreatePBuffer(), bug 4235 --- 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; }