Merge "Fix crash when handling recents animation canceled" into sc-dev
diff --git a/quickstep/src/com/android/quickstep/GestureState.java b/quickstep/src/com/android/quickstep/GestureState.java
index 015002f..e3ae361 100644
--- a/quickstep/src/com/android/quickstep/GestureState.java
+++ b/quickstep/src/com/android/quickstep/GestureState.java
@@ -364,7 +364,9 @@
         mStateCallback.setState(STATE_RECENTS_ANIMATION_ENDED);
         if (mRecentsAnimationCanceledSnapshot != null) {
             // Clean up the screenshot to finalize the recents animation cancel
-            mRecentsAnimationController.cleanupScreenshot();
+            if (mRecentsAnimationController != null) {
+                mRecentsAnimationController.cleanupScreenshot();
+            }
             mRecentsAnimationCanceledSnapshot = null;
         }
     }