summaryrefslogtreecommitdiff
path: root/core/hash_map.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/hash_map.h')
-rw-r--r--core/hash_map.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/hash_map.h b/core/hash_map.h
index 81ddc376d0..edc67e7806 100644
--- a/core/hash_map.h
+++ b/core/hash_map.h
@@ -112,7 +112,7 @@ private:
void erase_hash_table() {
- ERR_FAIL_COND(elements);
+ ERR_FAIL_COND_MSG(elements, "Cannot erase hash table if there are still elements inside.");
memdelete_arr(hash_table);
hash_table = 0;
@@ -210,6 +210,7 @@ private:
e->next = hash_table[index];
e->hash = hash;
e->pair.key = p_key;
+ e->pair.data = TData();
hash_table[index] = e;
elements++;