Signed-off-by: Juha-Pekka Heikkila <[email protected]>
---
src/mesa/main/hash.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/mesa/main/hash.c b/src/mesa/main/hash.c
index 4c92005..592ef4d 100644
--- a/src/mesa/main/hash.c
+++ b/src/mesa/main/hash.c
@@ -115,6 +115,11 @@ _mesa_NewHashTable(void)
if (table) {
table->ht = _mesa_hash_table_create(NULL, uint_key_compare);
+ if (table->ht == NULL) {
+ FREE(table);
+ return NULL;
+ }
+
_mesa_hash_table_set_deleted_key(table->ht, uint_key(DELETED_KEY_VALUE));
mtx_init(&table->Mutex, mtx_plain);
mtx_init(&table->WalkMutex, mtx_plain);
--
1.8.1.2
_______________________________________________
mesa-dev mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-dev