From: José Fonseca Date: Sat, 15 Mar 2008 00:55:28 +0000 (+0000) Subject: gallium: Ensure we don't add null objects to the table, as they mark empty handles. X-Git-Tag: 062012170305~17580^2~390^2~2249 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cb98f71d42e4c714dfb0c3e29d28d8418a1ee86b;p=profile%2Fivi%2Fmesa.git gallium: Ensure we don't add null objects to the table, as they mark empty handles. --- diff --git a/src/gallium/auxiliary/util/u_handle_table.c b/src/gallium/auxiliary/util/u_handle_table.c index ab427ee..d258729 100644 --- a/src/gallium/auxiliary/util/u_handle_table.c +++ b/src/gallium/auxiliary/util/u_handle_table.c @@ -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 */