| Index: src/profile-generator.cc
|
| diff --git a/src/profile-generator.cc b/src/profile-generator.cc
|
| index 814e9b3e9d578a62850a3dab5d46d41bdd022bf2..6bd8b46d58fc06a9187beb9fcb16c4f3edef5240 100644
|
| --- a/src/profile-generator.cc
|
| +++ b/src/profile-generator.cc
|
| @@ -1398,10 +1398,12 @@ void HeapObjectsMap::MoveObject(Address from, Address to) {
|
| if (entry != NULL) {
|
| void* value = entry->value;
|
| entries_map_.Remove(from, AddressHash(from));
|
| - entry = entries_map_.Lookup(to, AddressHash(to), true);
|
| - // We can have an entry at the new location, it is OK, as GC can overwrite
|
| - // dead objects with alive objects being moved.
|
| - entry->value = value;
|
| + if (to != NULL) {
|
| + entry = entries_map_.Lookup(to, AddressHash(to), true);
|
| + // We can have an entry at the new location, it is OK, as GC can overwrite
|
| + // dead objects with alive objects being moved.
|
| + entry->value = value;
|
| + }
|
| }
|
| }
|
|
|
|
|