summaryrefslogtreecommitdiff
blob: 6a5a9a3147c4c444800d8ad07f0611fda2628a6d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
From 11b60973bca1bc9bbda44be4c695e22d28d8ca4a Mon Sep 17 00:00:00 2001
From: Jesse Barnes <jbarnes@virtuousgeek.org>
Date: Tue, 21 Apr 2009 17:13:16 -0700
Subject: [PATCH 4/4] intel: NULL fake bo block when freeing in evict_all

Fixes assertion failures on later use of the object.
---
 libdrm/intel/intel_bufmgr_fake.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/libdrm/intel/intel_bufmgr_fake.c b/libdrm/intel/intel_bufmgr_fake.c
index e1f98d6..969c03d 100644
--- a/libdrm/intel/intel_bufmgr_fake.c
+++ b/libdrm/intel/intel_bufmgr_fake.c
@@ -1467,8 +1467,10 @@ drm_intel_bufmgr_fake_evict_all(drm_intel_bufmgr *bufmgr)
    assert(DRMLISTEMPTY(&bufmgr_fake->on_hardware));
 
    DRMLISTFOREACHSAFE(block, tmp, &bufmgr_fake->lru) {
+      drm_intel_bo_fake *bo_fake = (drm_intel_bo_fake *)block->bo;
       /* Releases the memory, and memcpys dirty contents out if necessary. */
       free_block(bufmgr_fake, block, 0);
+      bo_fake->block = NULL;
    }
 
    pthread_mutex_unlock(&bufmgr_fake->lock);
-- 
1.6.2.3