[Mesa-dev] [PATCH 2/4] dri2: protect dri2FlushFrontBuffer against NULL buffers.
Stéphane Marchesin
marcheu at chromium.org
Fri Jun 3 17:09:24 PDT 2011
---
src/glx/dri2_glx.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c
index b9f6f7f..942f7fc 100644
--- a/src/glx/dri2_glx.c
+++ b/src/glx/dri2_glx.c
@@ -457,6 +457,12 @@ static void
dri2FlushFrontBuffer(__DRIdrawable *driDrawable, void *loaderPrivate)
{
struct dri2_drawable *pdraw = loaderPrivate;
+ if (!pdraw)
+ return;
+
+ if (!pdraw->base.psc)
+ return;
+
struct glx_display *priv = __glXInitialize(pdraw->base.psc->dpy);
struct dri2_display *pdp = (struct dri2_display *)priv->dri2Display;
struct glx_context *gc = __glXGetCurrentContext();
--
1.7.5.3.367.ga9930
More information about the mesa-dev
mailing list