Merge "Prevent NPE when resetting divider bar visibility" into sc-v2-dev am: 5a25696bfd

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/15472699

Change-Id: Id99dd83824f2ebcbf80428f7877d9713a757d3a1
diff --git a/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java b/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java
index 6249e6a..42c89fd 100644
--- a/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java
+++ b/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java
@@ -1534,7 +1534,9 @@
         boolean wasVisible = mWasLauncherAlreadyVisible || mGestureStarted;
         mActivityInterface.onTransitionCancelled(wasVisible, mGestureState.getEndTarget());
 
-        TaskViewUtils.setDividerBarShown(mRecentsAnimationTargets.nonApps, true);
+        if (mRecentsAnimationTargets != null) {
+            TaskViewUtils.setDividerBarShown(mRecentsAnimationTargets.nonApps, true);
+        }
 
         // Leave the pending invisible flag, as it may be used by wallpaper open animation.
         if (mActivity != null) {