diff options
Diffstat (limited to 'src/sna')
-rw-r--r-- | src/sna/kgem.c | 1 | ||||
-rw-r--r-- | src/sna/sna_blt.c | 2 | ||||
-rw-r--r-- | src/sna/sna_io.c | 1 |
3 files changed, 3 insertions, 1 deletions
diff --git a/src/sna/kgem.c b/src/sna/kgem.c index 336bd7d6..78116153 100644 --- a/src/sna/kgem.c +++ b/src/sna/kgem.c @@ -1932,6 +1932,7 @@ void kgem_bo_undo(struct kgem *kgem, struct kgem_bo *bo) if (kgem->nexec != 1 || bo->exec == NULL) return; + assert(bo); DBG(("%s: only handle in batch, discarding last operations for handle=%d\n", __FUNCTION__, bo->handle)); 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; diff --git a/src/sna/sna_io.c b/src/sna/sna_io.c index 2a318206..746b1226 100644 --- a/src/sna/sna_io.c +++ b/src/sna/sna_io.c @@ -1438,6 +1438,7 @@ bool sna_replace(struct sna *sna, struct kgem *kgem = &sna->kgem; void *dst; + assert(bo); DBG(("%s(handle=%d, %dx%d, bpp=%d, tiling=%d) busy?=%d\n", __FUNCTION__, bo->handle, pixmap->drawable.width, |