[Mesa-dev] [PATCH 12/13] mesa/main: Don't proceed on deleting null hash table

Juha-Pekka Heikkila juhapekka.heikkila at gmail.com
Tue May 5 04:25:28 PDT 2015


Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila at gmail.com>
---
 src/mesa/main/hash.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/mesa/main/hash.c b/src/mesa/main/hash.c
index d04cccd..533b1d1 100644
--- a/src/mesa/main/hash.c
+++ b/src/mesa/main/hash.c
@@ -152,7 +152,8 @@ _mesa_NewHashTable(void)
 void
 _mesa_DeleteHashTable(struct _mesa_HashTable *table)
 {
-   assert(table);
+   if (!table)
+      return;
 
    if (_mesa_hash_table_next_entry(table->ht, NULL) != NULL) {
       _mesa_problem(NULL, "In _mesa_DeleteHashTable, found non-freed data");
-- 
1.8.5.1



More information about the mesa-dev mailing list