Commit ebff5c46 authored by Jacob Dufault's avatar Jacob Dufault Committed by Commit Bot

cros: Attempt to fix crash when suspending on login

CurrentBigUserView() could be null if
- there are no users on the device yet
- enterprise policy disables showing the logged in users

Bug: 889580
Change-Id: If7eea97b84697dfc2ced137741489a41f7520993
Reviewed-on: https://chromium-review.googlesource.com/1249815Reviewed-by: default avatarQuan Nguyen <qnnguyen@chromium.org>
Commit-Queue: Jacob Dufault <jdufault@chromium.org>
Cr-Commit-Position: refs/heads/master@{#594860}
parent eb23cc67
...@@ -1009,9 +1009,9 @@ void LockContentsView::OnStateChanged( ...@@ -1009,9 +1009,9 @@ void LockContentsView::OnStateChanged(
void LockContentsView::SuspendImminent( void LockContentsView::SuspendImminent(
power_manager::SuspendImminent::Reason reason) { power_manager::SuspendImminent::Reason reason) {
LoginAuthUserView* auth_user = CurrentBigUserView()->auth_user(); LoginBigUserView* big_user = CurrentBigUserView();
if (auth_user) if (big_user && big_user->auth_user())
auth_user->password_view()->Clear(); big_user->auth_user()->password_view()->Clear();
} }
void LockContentsView::ShowAuthErrorMessageForDebug(int unlock_attempt) { void LockContentsView::ShowAuthErrorMessageForDebug(int unlock_attempt) {
......
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