Index: snapshot/minidump/process_snapshot_minidump.cc |
diff --git a/snapshot/minidump/process_snapshot_minidump.cc b/snapshot/minidump/process_snapshot_minidump.cc |
index 256e429ecd2bbcd2cdea5df5b8918e410fd8eb7b..fa87981b5c2437e87d923f15bd53081c863c0381 100644 |
--- a/snapshot/minidump/process_snapshot_minidump.cc |
+++ b/snapshot/minidump/process_snapshot_minidump.cc |
@@ -309,16 +309,13 @@ bool ProcessSnapshotMinidump::InitializeModulesCrashpadInfo( |
++crashpad_module_index) { |
const MinidumpModuleCrashpadInfoLink& minidump_link = |
minidump_links[crashpad_module_index]; |
- if (module_crashpad_info_links->find( |
- minidump_link.minidump_module_list_index) != |
- module_crashpad_info_links->end()) { |
+ if (!module_crashpad_info_links |
+ ->insert(std::make_pair(minidump_link.minidump_module_list_index, |
+ minidump_link.location)).second) { |
LOG(WARNING) |
<< "duplicate module_crashpad_info_list minidump_module_list_index " |
<< minidump_link.minidump_module_list_index; |
return false; |
- } else { |
- module_crashpad_info_links->insert(std::make_pair( |
- minidump_link.minidump_module_list_index, minidump_link.location)); |
} |
} |