summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-10-02 12:22:51 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2012-10-02 12:22:51 +0100
commitbf44d9965b5cc0f0ee31ba2579783d8194fff756 (patch)
treefbc183ab1028c18107927ee0ca488e5ce8e0dacb /src
parent0ae6c2ccb006a99e8d7bbfff77f98cc58f62ce2f (diff)
sna: Prevent sna_damage_contains_box__no_reduce() from a NULL deref
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src')
-rw-r--r--src/sna/sna_accel.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index b5e6730f..62bf1d46 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -2855,7 +2855,8 @@ use_cpu_bo:
sna_damage_destroy(&priv->gpu_damage);
*damage = NULL;
} else {
- if (sna_damage_contains_box__no_reduce(priv->cpu_damage,
+ if (priv->cpu_damage &&
+ sna_damage_contains_box__no_reduce(priv->cpu_damage,
&region.extents))
*damage = NULL;
else