diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-03-04 15:48:33 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-03-04 15:48:33 +0000 |
commit | 3b5d556a93ac0afebf6c1dd02e0c92f6eb73f633 (patch) | |
tree | ebceeaaa2c710bb4d1d54bf7a4a73828c4b6de45 | |
parent | aaed9e9722aa30a3d6dc9a3f07309655de65b6bd (diff) |
sna: Fix assertion for checking inactive shadow buffers
We may have an ordinary malloc with no CPU bo attached so check before
dereferencing.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/sna_accel.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c index fc44b471..595b834f 100644 --- a/src/sna/sna_accel.c +++ b/src/sna/sna_accel.c @@ -11766,7 +11766,7 @@ static void sna_accel_inactive(struct sna *sna) sna_damage_destroy(&priv->cpu_damage); list_del(&priv->list); - assert(!priv->cpu_bo->sync); + assert(priv->cpu_bo == NULL || !priv->cpu_bo->sync); sna_pixmap_free_cpu(sna, priv); priv->undamaged = false; |