diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2013-09-25 13:54:43 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2013-09-25 13:54:43 +0100 |
commit | d7eb40efa79dd9ea720606b94a20179c7dd18e03 (patch) | |
tree | cc91561410716d450c2faf34d1637ca8c76db7e4 /src/sna/sna_blt.c | |
parent | a934b2455a7b67d124903ab086a323169f0b4d69 (diff) |
sna: Check that the bo exists before attempting to undo it
Fixes a NULL dereference from sna_blt_composite().
Bugzilla: https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/1228677
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_blt.c')
-rw-r--r-- | src/sna/sna_blt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sna/sna_blt.c b/src/sna/sna_blt.c index 1f173daf..fdcc4198 100644 --- a/src/sna/sna_blt.c +++ b/src/sna/sna_blt.c @@ -2250,7 +2250,7 @@ fill: tmp->dst.bo = sna_drawable_use_bo(dst->pDrawable, hint, &dst_box, &tmp->damage); - if (hint & REPLACES) + if (tmp->dst.bo && hint & REPLACES) kgem_bo_undo(&sna->kgem, tmp->dst.bo); ret = false; |