diff --git a/lib/glacier/container/hash_map.h b/lib/glacier/container/hash_map.h index a101bda..e8a9eec 100644 --- a/lib/glacier/container/hash_map.h +++ b/lib/glacier/container/hash_map.h @@ -92,6 +92,9 @@ const V& HashMap::at(const K& key) const { template bool HashMap::Contains(const K& key) const { + if (data_.size() == 0) { + return false; + } uint64_t hc = H()(key); auto& ll = data_[hc % data_.size()];