From 3d3ecb8520ccca0863026a94e7fda9840aff6c0a Mon Sep 17 00:00:00 2001 From: Stéphane Marchesin Date: Fri, 3 Jun 2011 17:03:09 -0700 Subject: dri2: protect dri2FlushFrontBuffer against NULL buffers. --- src/glx/dri2_glx.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/glx/dri2_glx.c') diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c index 69b47ae45e..506754ccc1 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(); -- cgit v1.2.3