diff options
author | José Fonseca <[email protected]> | 2008-03-18 11:49:29 +0000 |
---|---|---|
committer | José Fonseca <[email protected]> | 2008-03-18 17:20:56 +0000 |
commit | 56ac9eb1f6e3826e4e8f7ab0f1fdbeed06c41c9f (patch) | |
tree | 1a677c36084b376610d98d5bd324b22482d6193a | |
parent | d1ca951cc4f3392aeec2817e97fb9ade2c1b7881 (diff) |
gallium: Don't be pedantic about removing non exiting items from the table.
-rw-r--r-- | src/gallium/auxiliary/util/u_handle_table.c | 8 |
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 d25872972aa..fae4ac4039c 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; |