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

assistant: fix crash when trying to hide non-exist Assistant

When assistant controllers init and receives an assistant status of
NOT_READY, it tries to hide non-exist Assistant, which will eventually
cause a segfault.

Bug: 901720
Test: locally build and test
Change-Id: I4bf7247c175906167436849b4514c450c763c79f
Reviewed-on: https://chromium-review.googlesource.com/c/1318680Reviewed-by: default avatarTao Wu <wutao@chromium.org>
Commit-Queue: Xiaohui Chen <xiaohuic@chromium.org>
Cr-Commit-Position: refs/heads/master@{#605524}
parent 952eef4b
......@@ -318,7 +318,7 @@ void AssistantUiController::ShowUi(AssistantSource source) {
}
void AssistantUiController::HideUi(AssistantSource source) {
if (model_.visibility() == AssistantVisibility::kHidden)
if (model_.visibility() != AssistantVisibility::kVisible)
return;
if (container_view_)
......
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