Commit e55fd1db authored by Jeroen Dhollander's avatar Jeroen Dhollander Committed by Commit Bot

Fix crash in |AssistantSettingsImpl::SyncSpeakerIdEnrollmentStatus|

This crash could happen if the enrollment update comes after the
Assistant has been stopped.

Bug: 1147895
Change-Id: I56b1db6e859fc24c621c36fe984f31168365fcf5
Tests: Compiled
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2533194Reviewed-by: default avatarXiaohui Chen <xiaohuic@chromium.org>
Reviewed-by: default avatarJames Cook <jamescook@chromium.org>
Reviewed-by: default avatarYue Li <updowndota@chromium.org>
Commit-Queue: Jeroen Dhollander <jeroendh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#828950}
parent 81abfc99
...@@ -88,7 +88,9 @@ void GoogleAssistantHandler::HandleSyncVoiceModelStatus( ...@@ -88,7 +88,9 @@ void GoogleAssistantHandler::HandleSyncVoiceModelStatus(
const base::ListValue* args) { const base::ListValue* args) {
CHECK_EQ(0U, args->GetSize()); CHECK_EQ(0U, args->GetSize());
assistant::AssistantSettings::Get()->SyncSpeakerIdEnrollmentStatus(); auto* settings = assistant::AssistantSettings::Get();
if (settings)
settings->SyncSpeakerIdEnrollmentStatus();
} }
void GoogleAssistantHandler::HandleInitialized(const base::ListValue* args) { void GoogleAssistantHandler::HandleInitialized(const base::ListValue* args) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment