gallium: Ensure we don't add null objects to the table, as they mark empty handles.

This commit is contained in:
José Fonseca 2008-03-15 00:55:28 +00:00
parent c2bf23b837
commit cb98f71d42
1 changed files with 4 additions and 0 deletions

View File

@ -175,6 +175,10 @@ handle_table_set(struct handle_table *ht,
if(!handle || handle > ht->size)
return 0;
assert(object);
if(!object)
return 0;
index = handle - 1;
/* grow the table if necessary */