diff options
author | xiyuan@chromium.org <xiyuan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-25 00:20:54 +0000 |
---|---|---|
committer | xiyuan@chromium.org <xiyuan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-25 00:20:54 +0000 |
commit | 8fe595bbe0f784f4a247b79daaaf2d17f675a008 (patch) | |
tree | a29fa688efd6c8c4c6004a6b8ef20b74312f1d24 /ash | |
parent | fb9b3b21f7a430c77b21ba3f1e305a26ae36172b (diff) | |
download | chromium_src-8fe595bbe0f784f4a247b79daaaf2d17f675a008.zip chromium_src-8fe595bbe0f784f4a247b79daaaf2d17f675a008.tar.gz chromium_src-8fe595bbe0f784f4a247b79daaaf2d17f675a008.tar.bz2 |
ash: Fix ShelfLayoutManager::UpdateVisibilityState crash on shutdown.
ShelfLayoutManager clears |workspace_controller_| in its PrepareForShutdown
during shutdown and the case needs to be handled in UpdateVisibilityState.
BUG=334321
Review URL: https://codereview.chromium.org/146703003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@247031 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash')
-rw-r--r-- | ash/shelf/shelf_layout_manager.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ash/shelf/shelf_layout_manager.cc b/ash/shelf/shelf_layout_manager.cc index 3f22fce..21fb0b3 100644 --- a/ash/shelf/shelf_layout_manager.cc +++ b/ash/shelf/shelf_layout_manager.cc @@ -311,6 +311,11 @@ ShelfVisibilityState ShelfLayoutManager::CalculateShelfVisibility() { } void ShelfLayoutManager::UpdateVisibilityState() { + // Bail out early when there is no |workspace_controller_|, which happens + // during shutdown after PrepareForShutdown. + if (!workspace_controller_) + return; + if (Shell::GetInstance()->session_state_delegate()->IsScreenLocked()) { SetState(SHELF_VISIBLE); } else { |