Mesa (master): dri2: protect dri2FlushFrontBuffer against NULL buffers.
Stephane Marchesin
marcheu at kemper.freedesktop.org
Mon Jun 6 20:07:53 UTC 2011
Module: Mesa
Branch: master
Commit: 3d3ecb8520ccca0863026a94e7fda9840aff6c0a
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=3d3ecb8520ccca0863026a94e7fda9840aff6c0a
Author: Stéphane Marchesin <marcheu at chromium.org>
Date: Fri Jun 3 17:03:09 2011 -0700
dri2: protect dri2FlushFrontBuffer against NULL buffers.
---
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 69b47ae..506754c 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();
More information about the mesa-commit
mailing list