gallium: Don't be pedantic about removing non exiting items from the table.

This commit is contained in:
José Fonseca 2008-03-18 11:49:29 +00:00
parent d1ca951cc4
commit 56ac9eb1f6

View file

@ -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;