diff --git a/components/storage_monitor/storage_monitor_linux.cc b/components/storage_monitor/storage_monitor_linux.cc index 75f5629589314..ed7a85884ea52 100644 --- a/components/storage_monitor/storage_monitor_linux.cc +++ b/components/storage_monitor/storage_monitor_linux.cc @@ -420,8 +420,10 @@ void StorageMonitorLinux::HandleDeviceMountedMultipleTimes( CHECK(priority != mount_priority_map_.end()); const base::FilePath& other_mount_point = priority->second.begin()->first; priority->second[mount_point] = false; - mount_info_map_[mount_point] = - mount_info_map_.find(other_mount_point)->second; + auto other_info = mount_info_map_.find(other_mount_point); + // crbug.com/####: EjectDevice() can desync mount_priority_map_. + CHECK(other_info != mount_info_map_.end()); + mount_info_map_[mount_point] = other_info->second; } void StorageMonitorLinux::AddNewMount(