Commit b7636abd authored by Xiaohui Chen's avatar Xiaohui Chen Committed by Commit Bot

assistant: fix a crash

Avoid the crash when handing stop interaction without an active assistant
manager. The root cause of this issue is still unknown.

Bug: 882952
Test: locally build and run
Change-Id: Ic7b9fc0f013ba926917a2b266235e887c169418b
Reviewed-on: https://chromium-review.googlesource.com/1240856Reviewed-by: default avatarMuyuan Li <muyuanli@chromium.org>
Commit-Queue: Xiaohui Chen <xiaohuic@chromium.org>
Cr-Commit-Position: refs/heads/master@{#593677}
parent 9d234f0b
......@@ -220,6 +220,11 @@ void AssistantManagerServiceImpl::StartVoiceInteraction() {
void AssistantManagerServiceImpl::StopActiveInteraction(
bool cancel_conversation) {
platform_api_->SetMicState(false);
if (!assistant_manager_internal_) {
VLOG(1) << "Stopping interaction without assistant manager.";
return;
}
assistant_manager_internal_->StopAssistantInteractionInternal(
cancel_conversation);
}
......
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