summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJerome Glisse <jglisse@redhat.com>2010-04-26 15:55:26 +0200
committerKeith Packard <keithp@keithp.com>2010-04-26 08:42:57 -0700
commitdaa6f9308fa57e41210f78d92dbdb3f1c8eae6ad (patch)
tree7f1a171a2f0ef9aa572f097f1c669d65d1da544b
parent35d208125fa0ec78e8d694adc52886b977e789cf (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>
-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..8159f2f26 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 (pScreen->SourceValidate) {
+ swap(pExaScr, pScreen, SourceValidate);
+ pScreen->SourceValidate(pDrawable, x, y, width, height);
+ swap(pExaScr, pScreen, SourceValidate);
+ }
}
static Bool