From daa6f9308fa57e41210f78d92dbdb3f1c8eae6ad Mon Sep 17 00:00:00 2001 From: Jerome Glisse Date: Mon, 26 Apr 2010 15:55:26 +0200 Subject: exa: avoid calling non existent SourceValidate callback MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Acked-by: Michel Dänzer Signed-off-by: Keith Packard --- exa/exa_unaccel.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/exa/exa_unaccel.c b/exa/exa_unaccel.c index db9ce9f56..8159f2f26 100644 --- a/exa/exa_unaccel.c +++ b/exa/exa_unaccel.c @@ -462,9 +462,11 @@ ExaSrcValidate(DrawablePtr pDrawable, REGION_UNION(pScreen, dst, dst, ®); REGION_UNINIT(pScreen, ®); - 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 -- cgit v1.2.3