[PATCH] exa: check for valid SourceValidate callback ptr

Jerome Glisse jglisse at redhat.com
Fri Apr 9 10:26:25 PDT 2010


During rotation the screen SourceValidate ptr is set to NULL
(see hw/xfree86/modes/xf86Rotate.c xf86RotateRedisplay) to avoid
segfaulting in exa unaccelerated path check for a valid SourceValidate
ptr.

Signed-off-by: Jerome Glisse <jglisse at redhat.com>
---
 exa/exa_unaccel.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/exa/exa_unaccel.c b/exa/exa_unaccel.c
index b4ead7f..d4133bf 100644
--- a/exa/exa_unaccel.c
+++ b/exa/exa_unaccel.c
@@ -465,7 +465,9 @@ ExaSrcValidate(DrawablePtr pDrawable,
     REGION_UNINIT(pScreen, &reg);
 
     swap(pExaScr, pScreen, SourceValidate);
-    pScreen->SourceValidate(pDrawable, x, y, width, height);
+    if (pScreen->SourceValidate) {
+        pScreen->SourceValidate(pDrawable, x, y, width, height);
+    }
     swap(pExaScr, pScreen, SourceValidate);
 }
 
-- 
1.7.0.1



More information about the xorg-devel mailing list