sna/dri: Guard against failed batch submission
Avoid dereferencing a NULL bo if we do not submit a batch for the copy operation. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=61708 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
e4df4e03b1
commit
cd313a8d5d
|
|
@ -725,7 +725,8 @@ sna_dri_copy_to_front(struct sna *sna, DrawablePtr draw, RegionPtr region,
|
|||
if (flush) { /* STAT! */
|
||||
struct kgem_request *rq = sna->kgem.next_request;
|
||||
kgem_submit(&sna->kgem);
|
||||
bo = kgem_bo_reference(rq->bo);
|
||||
if (rq->bo)
|
||||
bo = kgem_bo_reference(rq->bo);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue