diff options
Diffstat (limited to 'sync/syncable/nigori_util.cc')
-rw-r--r-- | sync/syncable/nigori_util.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sync/syncable/nigori_util.cc b/sync/syncable/nigori_util.cc index f85e325..5463140 100644 --- a/sync/syncable/nigori_util.cc +++ b/sync/syncable/nigori_util.cc @@ -155,7 +155,9 @@ bool UpdateEntryWithEncryption( ModelType type = GetModelTypeFromSpecifics(new_specifics); DCHECK_GE(type, FIRST_REAL_MODEL_TYPE); const sync_pb::EntitySpecifics& old_specifics = entry->GetSpecifics(); - const ModelTypeSet encrypted_types = nigori_handler->GetEncryptedTypes(trans); + const ModelTypeSet encrypted_types = + nigori_handler? + nigori_handler->GetEncryptedTypes(trans) : ModelTypeSet(); // It's possible the nigori lost the set of encrypted types. If the current // specifics are already encrypted, we want to ensure we continue encrypting. bool was_encrypted = old_specifics.has_encrypted(); @@ -166,7 +168,7 @@ bool UpdateEntryWithEncryption( } if ((!SpecificsNeedsEncryption(encrypted_types, new_specifics) && !was_encrypted) || - !cryptographer->is_initialized()) { + !cryptographer || !cryptographer->is_initialized()) { // No encryption required or we are unable to encrypt. generated_specifics.CopyFrom(new_specifics); } else { |