From c6bc52cb6663138d1273447cb7661fa6e958f539 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Mon, 21 Jun 2010 14:08:50 +1000 Subject: [PATCH] dri2: avoid crash with old dri drivers. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I built latest server and copied over a mesa 7.8 dri2 driver to use with it, and it crashed in here starting compiz. Looks like we need to validate the flush extension is registered before calling invalidate. Signed-off-by: Dave Airlie Reviewed-by: Michel Dänzer Reviewed-by: Keith Packard Signed-off-by: Keith Packard --- glx/glxdri2.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/glx/glxdri2.c b/glx/glxdri2.c index 177c73ca2..970a51ae3 100644 --- a/glx/glxdri2.c +++ b/glx/glxdri2.c @@ -435,7 +435,8 @@ __glXDRIinvalidateBuffers(DrawablePtr pDraw, void *priv) __GLXDRIdrawable *private = priv; __GLXDRIscreen *screen = private->screen; - (*screen->flush->invalidate)(private->driDrawable); + if (screen->flush) + (*screen->flush->invalidate)(private->driDrawable); #endif }