Commit d0b5933c authored by Manu Cornet's avatar Manu Cornet Committed by Commit Bot

CrOS Shelf: Guard against a null dereference in |ShelfConfig|

Bug: 1010827
Change-Id: Ib03c22e708bca1d2fb2fe48dad15c1757c8d4db0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1838299
Commit-Queue: Manu Cornet <manucornet@chromium.org>
Commit-Queue: Andrew Xu <andrewxu@chromium.org>
Auto-Submit: Manu Cornet <manucornet@chromium.org>
Reviewed-by: default avatarAndrew Xu <andrewxu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#702586}
parent 57e36054
......@@ -205,9 +205,12 @@ int ShelfConfig::status_area_hit_region_padding() const {
bool ShelfConfig::is_in_app() const {
Shell* shell = Shell::Get();
return !shell->overview_controller()->InOverviewSession() &&
shell->session_controller()->GetSessionState() ==
session_manager::SessionState::ACTIVE &&
const auto* overview = shell->overview_controller();
const auto* session = shell->session_controller();
if (!overview || !session)
return false;
return !overview->InOverviewSession() &&
session->GetSessionState() == session_manager::SessionState::ACTIVE &&
!is_app_list_visible_;
}
......
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