Skip to content

Commit

Permalink
[Sync] Fix crash while updating subscriptions for invalidations
Browse files Browse the repository at this point in the history
The list of subscriptions may be updated when sync engine is not
initialized.

Bug: 1318023
Change-Id: I7448596076a09d046ac17d746e3bbd778cee4ad5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3596150
Auto-Submit: Rushan Suleymanov <rushans@google.com>
Commit-Queue: Rushan Suleymanov <rushans@google.com>
Reviewed-by: Marc Treib <treib@chromium.org>
Commit-Queue: Marc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/main@{#994177}
  • Loading branch information
Rushan Suleymanov authored and Chromium LUCI CQ committed Apr 20, 2022
1 parent a7f84c1 commit c9192fe
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion components/sync/driver/sync_service_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1237,7 +1237,8 @@ void SyncServiceImpl::UpdateDataTypesForInvalidations() {

// Wait for configuring data types. This is needed to consider proxy types
// which become known during configuration.
if (data_type_manager_->state() != DataTypeManager::CONFIGURED) {
if (!data_type_manager_ ||
data_type_manager_->state() != DataTypeManager::CONFIGURED) {
return;
}

Expand Down

0 comments on commit c9192fe

Please sign in to comment.