[PATCH] dri2: avoid crash with old dri drivers.

Dave Airlie airlied at gmail.com
Sun Jun 20 21:08:50 PDT 2010


From: Dave Airlie <airlied at redhat.com>

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 <airlied at redhat.com>
---
 glx/glxdri2.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/glx/glxdri2.c b/glx/glxdri2.c
index 177c73c..970a51a 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
 }
 
-- 
1.7.0.1



More information about the xorg-devel mailing list