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

Juha-Pekka Heikkila juhapekka.heikkila at gmail.com
Fri Nov 28 03:25:12 PST 2014


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 52095f7..2052412 100644
--- a/src/mesa/main/hash.c
+++ b/src/mesa/main/hash.c
@@ -145,7 +145,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