| Index: ash/wm/lock_state_controller.cc
|
| diff --git a/ash/wm/lock_state_controller.cc b/ash/wm/lock_state_controller.cc
|
| index 31a874d1583cc4d34e7b6034f799abb46c97b8ec..293d95a9424f4f3d22d086b52e152166fab11f35 100644
|
| --- a/ash/wm/lock_state_controller.cc
|
| +++ b/ash/wm/lock_state_controller.cc
|
| @@ -162,8 +162,12 @@ void LockStateController::RequestShutdown() {
|
| shutting_down_ = true;
|
|
|
| Shell* shell = Shell::GetInstance();
|
| - shell->cursor_manager()->HideCursor();
|
| - shell->cursor_manager()->LockCursor();
|
| + // TODO(derat): Remove these null checks once mash instantiates a
|
| + // CursorManager.
|
| + if (shell->cursor_manager()) {
|
| + shell->cursor_manager()->HideCursor();
|
| + shell->cursor_manager()->LockCursor();
|
| + }
|
|
|
| animator_->StartAnimation(
|
| SessionStateAnimator::ROOT_CONTAINER,
|
| @@ -200,8 +204,10 @@ void LockStateController::OnAppTerminating() {
|
| if (!shutting_down_) {
|
| shutting_down_ = true;
|
| Shell* shell = Shell::GetInstance();
|
| - shell->cursor_manager()->HideCursor();
|
| - shell->cursor_manager()->LockCursor();
|
| + if (shell->cursor_manager()) {
|
| + shell->cursor_manager()->HideCursor();
|
| + shell->cursor_manager()->LockCursor();
|
| + }
|
| animator_->StartAnimation(SessionStateAnimator::kAllNonRootContainersMask,
|
| SessionStateAnimator::ANIMATION_HIDE_IMMEDIATELY,
|
| SessionStateAnimator::ANIMATION_SPEED_IMMEDIATE);
|
| @@ -271,7 +277,8 @@ void LockStateController::OnPreShutdownAnimationTimeout() {
|
| shutting_down_ = true;
|
|
|
| Shell* shell = Shell::GetInstance();
|
| - shell->cursor_manager()->HideCursor();
|
| + if (shell->cursor_manager())
|
| + shell->cursor_manager()->HideCursor();
|
|
|
| StartRealShutdownTimer(false);
|
| }
|
| @@ -307,7 +314,8 @@ void LockStateController::OnRealPowerTimeout() {
|
| void LockStateController::StartCancellableShutdownAnimation() {
|
| Shell* shell = Shell::GetInstance();
|
| // Hide cursor, but let it reappear if the mouse moves.
|
| - shell->cursor_manager()->HideCursor();
|
| + if (shell->cursor_manager())
|
| + shell->cursor_manager()->HideCursor();
|
|
|
| animator_->StartAnimation(
|
| SessionStateAnimator::ROOT_CONTAINER,
|
|
|