It may happen if util_slab_create has not been called.
---
src/gallium/auxiliary/util/u_slab.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/gallium/auxiliary/util/u_slab.c
b/src/gallium/auxiliary/util/u_slab.c
index 21bf2d7..f9f5ef6 100644
--- a/src/gallium/auxiliary/util/u_slab.c
+++ b/src/gallium/auxiliary/util/u_slab.c
@@ -160,9 +160,11 @@ void util_slab_destroy(struct util_slab_mempool *pool)
{
struct util_slab_page *page, *temp;
- foreach_s(page, temp, &pool->list) {
- remove_from_list(page);
- FREE(page);
+ if (pool->list.next) {
+ foreach_s(page, temp, &pool->list) {
+ remove_from_list(page);
+ FREE(page);
+ }
}
pipe_mutex_destroy(pool->mutex);
--
1.7.5.4
_______________________________________________
mesa-dev mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-dev