mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-06 19:40:10 +01:00
util: add assert that key cannot be NULL on insertion
Signed-off-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
parent
68233801ae
commit
0abebec012
1 changed files with 2 additions and 0 deletions
|
|
@ -295,6 +295,8 @@ hash_table_insert(struct hash_table *ht, uint32_t hash,
|
|||
uint32_t start_hash_address, hash_address;
|
||||
struct hash_entry *available_entry = NULL;
|
||||
|
||||
assert(key != NULL);
|
||||
|
||||
if (ht->entries >= ht->max_entries) {
|
||||
_mesa_hash_table_rehash(ht, ht->size_index + 1);
|
||||
} else if (ht->deleted_entries + ht->entries >= ht->max_entries) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue