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.

(cherry picked from commit c9192fe)

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-Original-Commit-Position: refs/heads/main@{#994177}
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3599288
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/branch-heads/5005@{#105}
Cr-Branched-From: 5b4d945-refs/heads/main@{#992738}
  • Loading branch information
Rushan Suleymanov authored and Chromium LUCI CQ committed Apr 22, 2022
1 parent 89f6e16 commit 96c9cce
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion components/sync/driver/sync_service_impl.cc
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 96c9cce

Please sign in to comment.