In unaccel path we were unconditionaly calling the SourceValidate
callback but in some case it could be NULL. Check if we have a
valid callback before calling it.

Signed-off-by: Jerome Glisse <[email protected]>
Acked-by: Michel Dänzer <[email protected]>
---
 exa/exa_unaccel.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/exa/exa_unaccel.c b/exa/exa_unaccel.c
index b4ead7f..69d2b4b 100644
--- a/exa/exa_unaccel.c
+++ b/exa/exa_unaccel.c
@@ -464,9 +464,11 @@ ExaSrcValidate(DrawablePtr pDrawable,
     REGION_UNION(pScreen, dst, dst, &reg);
     REGION_UNINIT(pScreen, &reg);
 
-    swap(pExaScr, pScreen, SourceValidate);
-    pScreen->SourceValidate(pDrawable, x, y, width, height);
-    swap(pExaScr, pScreen, SourceValidate);
+    if (pScreen->SourceValidate) {
+        swap(pExaScr, pScreen, SourceValidate);
+        pScreen->SourceValidate(pDrawable, x, y, width, height);
+        swap(pExaScr, pScreen, SourceValidate);
+    }
 }
 
 static Bool
-- 
1.7.0.1

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to