diff options
Diffstat (limited to 'src/glx')
-rw-r--r-- | src/glx/dri2_glx.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c index b9f6f7fcf03..69b47ae45e2 100644 --- a/src/glx/dri2_glx.c +++ b/src/glx/dri2_glx.c @@ -675,9 +675,14 @@ dri2InvalidateBuffers(Display *dpy, XID drawable) { __GLXDRIdrawable *pdraw = dri2GetGlxDrawableFromXDrawableId(dpy, drawable); - struct dri2_screen *psc = (struct dri2_screen *) pdraw->psc; + struct dri2_screen *psc; struct dri2_drawable *pdp = (struct dri2_drawable *) pdraw; + if (!pdraw) + return; + + psc = (struct dri2_screen *) pdraw->psc; + #if __DRI2_FLUSH_VERSION >= 3 if (pdraw && psc->f && psc->f->base.version >= 3 && psc->f->invalidate) psc->f->invalidate(pdp->driDrawable); |