| Index: runtime/vm/hash_map.h
|
| diff --git a/runtime/vm/hash_map.h b/runtime/vm/hash_map.h
|
| index c50d17e87bf9e1fa3ba08d69867078ea6cd4d486..6526acaf5c6b81f5c065e78ca06a10ceea543c2f 100644
|
| --- a/runtime/vm/hash_map.h
|
| +++ b/runtime/vm/hash_map.h
|
| @@ -332,6 +332,12 @@ bool BaseDirectChainedHashMap<KeyValueTrait, B, Allocator>::Remove(
|
|
|
| intptr_t current = array_[pos].next;
|
|
|
| + // If there's only the single element in the bucket and it does not match the
|
| + // key to be removed, just return.
|
| + if (current == kNil) {
|
| + return false;
|
| + }
|
| +
|
| // Check the case where the second element in the bucket is the one to be
|
| // removed.
|
| if (KeyValueTrait::KeyOf(lists_[current].kv) == key) {
|
|
|