| Index: components/sync/device_info/device_info_sync_service.cc
|
| diff --git a/components/sync/device_info/device_info_sync_service.cc b/components/sync/device_info/device_info_sync_service.cc
|
| index 3bad31fd4ea04524ba776c1084a42e5545c9b5af..f6f239891064cd8e1c5e6b46cfee19a787da0135 100644
|
| --- a/components/sync/device_info/device_info_sync_service.cc
|
| +++ b/components/sync/device_info/device_info_sync_service.cc
|
| @@ -285,12 +285,18 @@ void DeviceInfoSyncService::SendLocalData(
|
|
|
| const DeviceInfo* device_info =
|
| local_device_info_provider_->GetLocalDeviceInfo();
|
| - const SyncData& data = CreateLocalData(device_info);
|
| - StoreSyncData(device_info->guid(), data);
|
|
|
| - SyncChangeList change_list;
|
| - change_list.push_back(SyncChange(FROM_HERE, change_type, data));
|
| - sync_processor_->ProcessSyncChanges(FROM_HERE, change_list);
|
| + // While the |pulse_timer_| is shutdown eventually in StopSyncing(), our
|
| + // device info provider is ripped out from underneath us before that happens,
|
| + // and we need to guard against this.
|
| + if (device_info != nullptr) {
|
| + const SyncData& data = CreateLocalData(device_info);
|
| + StoreSyncData(device_info->guid(), data);
|
| +
|
| + SyncChangeList change_list;
|
| + change_list.push_back(SyncChange(FROM_HERE, change_type, data));
|
| + sync_processor_->ProcessSyncChanges(FROM_HERE, change_list);
|
| + }
|
|
|
| pulse_timer_.Start(
|
| FROM_HERE, DeviceInfoUtil::kPulseInterval,
|
|
|