aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/hashmap.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/common/hashmap.h b/common/hashmap.h
index d45280133b..bc04c0dbb4 100644
--- a/common/hashmap.h
+++ b/common/hashmap.h
@@ -431,6 +431,7 @@ int HashMap<Key, Val, HashFunc, EqualFunc>::lookupAndCreateIfMissing(const Key &
if (_storage[ctr] == NULL) {
_storage[ctr] = allocNode(key);
+ assert(_storage[ctr] != NULL);
_size++;
// Keep the load factor below a certain threshold.
@@ -439,6 +440,7 @@ int HashMap<Key, Val, HashFunc, EqualFunc>::lookupAndCreateIfMissing(const Key &
capacity = capacity < 500 ? (capacity * 4) : (capacity * 2);
expandStorage(capacity);
ctr = lookup(key);
+ assert(_storage[ctr] != NULL);
}
}