summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/util/u_handle_table.c
diff options
context:
space:
mode:
authorJosé Fonseca <jrfonseca@tungstengraphics.com>2008-03-18 11:49:29 +0000
committerJosé Fonseca <jrfonseca@tungstengraphics.com>2008-03-18 17:20:56 +0000
commit56ac9eb1f6e3826e4e8f7ab0f1fdbeed06c41c9f (patch)
tree1a677c36084b376610d98d5bd324b22482d6193a /src/gallium/auxiliary/util/u_handle_table.c
parentd1ca951cc4f3392aeec2817e97fb9ade2c1b7881 (diff)
gallium: Don't be pedantic about removing non exiting items from the table.
Diffstat (limited to 'src/gallium/auxiliary/util/u_handle_table.c')
-rw-r--r--src/gallium/auxiliary/util/u_handle_table.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/util/u_handle_table.c b/src/gallium/auxiliary/util/u_handle_table.c
index d25872972a..fae4ac4039 100644
--- a/src/gallium/auxiliary/util/u_handle_table.c
+++ b/src/gallium/auxiliary/util/u_handle_table.c
@@ -226,9 +226,13 @@ handle_table_remove(struct handle_table *ht,
index = handle - 1;
object = ht->objects[index];
- assert(object);
+ if(!object) {
+ /* XXX: this warning may be noisy for legitimate use -- remove later */
+ debug_warning("removing empty handle");
+ return;
+ }
- if(object && ht->destroy)
+ if(ht->destroy)
ht->destroy(object);
ht->objects[index] = NULL;