Commit 53f7d3e8 authored by Manu Cornet's avatar Manu Cornet Committed by Commit Bot

CrOS Shelf: Prevent a crash when calculating hotseat state during shutdown

Change-Id: I4ab18dcab81d8622a52b9b744bd7aa57ae1693da
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1911220Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Commit-Queue: Manu Cornet <manucornet@chromium.org>
Cr-Commit-Position: refs/heads/master@{#714499}
parent ecdd480a
......@@ -1079,6 +1079,10 @@ HotseatState ShelfLayoutManager::CalculateHotseatState(
return HotseatState::kShown;
auto* app_list_controller = Shell::Get()->app_list_controller();
// If the app list controller is null, we are probably in the middle of
// a shutdown, let's not change the hotseat state.
if (!app_list_controller)
return hotseat_state();
const auto* overview_controller = Shell::Get()->overview_controller();
const bool in_overview =
((overview_controller && overview_controller->InOverviewSession()) ||
......
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