diff --git a/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java b/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java index e867f07fb7..7e45369692 100644 --- a/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java +++ b/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java @@ -387,8 +387,11 @@ public abstract class AbsSwipeUpHandler, mGestureState.runOnceAtState(STATE_RECENTS_ANIMATION_CANCELED, () -> { ThumbnailData snapshot = mGestureState.consumeRecentsAnimationCanceledSnapshot(); if (snapshot != null) { - mRecentsView.switchToScreenshot(snapshot, - () -> mRecentsAnimationController.cleanupScreenshot()); + mRecentsView.switchToScreenshot(snapshot, () -> { + if (mRecentsAnimationController != null) { + mRecentsAnimationController.cleanupScreenshot(); + } + }); mRecentsView.onRecentsAnimationComplete(); } });