diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2011-12-13 13:14:15 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2011-12-13 13:14:15 +0000 |
commit | e037379c8e57f8e42956863c10a4e2b18057a6d5 (patch) | |
tree | dd2723e9b8ecb6e3cd7f7487f39cc3de28c5ff0c | |
parent | 5d5b2b8ee203ae2274fc7d13ed38d2945facca9e (diff) |
sna: Fix a debugging assert
The bo is allowed to be NULL, so defer the assert until after it is
known to be non-NULL.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/kgem.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sna/kgem.c b/src/sna/kgem.c index b76a180a..972f0231 100644 --- a/src/sna/kgem.c +++ b/src/sna/kgem.c @@ -1807,13 +1807,13 @@ uint32_t kgem_add_reloc(struct kgem *kgem, { int index; - assert(bo->refcnt); assert((read_write_domain & 0x7fff) == 0 || bo != NULL); index = kgem->nreloc++; assert(index < ARRAY_SIZE(kgem->reloc)); kgem->reloc[index].offset = pos * sizeof(kgem->batch[0]); if (bo) { + assert(bo->refcnt); assert(!bo->purged); delta += bo->delta; |