summaryrefslogtreecommitdiff
path: root/exa
diff options
context:
space:
mode:
authorJerome Glisse <jglisse@redhat.com>2010-04-26 16:01:48 +0200
committerKeith Packard <keithp@keithp.com>2010-04-26 09:15:22 -0700
commitb557571dbff3d9a615e03cad904d46b8af9153a0 (patch)
tree9b33cb1f53bbc1d3048ab1a0f43d2b7f66919c82 /exa
parent0e6e75b04eaca311962390533acc03d0ac5ece83 (diff)
exa: avoid calling non existent SourceValidate callback
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 <jglisse@redhat.com> Acked-by: Michel Dänzer <michel@daenzer.net> Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'exa')
-rw-r--r--exa/exa_unaccel.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/exa/exa_unaccel.c b/exa/exa_unaccel.c
index db9ce9f56..8fc93171b 100644
--- a/exa/exa_unaccel.c
+++ b/exa/exa_unaccel.c
@@ -462,9 +462,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 (pExaScr->SourceValidate) {
+ swap(pExaScr, pScreen, SourceValidate);
+ pScreen->SourceValidate(pDrawable, x, y, width, height);
+ swap(pExaScr, pScreen, SourceValidate);
+ }
}
static Bool