Check null before getting DeviceProfile in AbsSwipeUpHandler

Fix: 236677962
Test: manual
Change-Id: Ibf3dbc6db509a54c87dc4bd64a7c7ea213870708
diff --git a/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java b/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java
index b3ef71e..4a36f6e 100644
--- a/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java
+++ b/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java
@@ -1136,7 +1136,7 @@
             mInputConsumerProxy.enable();
         }
         if (endTarget == HOME) {
-            duration = mActivity.getDeviceProfile().isTaskbarPresent
+            duration = mActivity != null && mActivity.getDeviceProfile().isTaskbarPresent
                     ? StaggeredWorkspaceAnim.DURATION_TASKBAR_MS
                     : StaggeredWorkspaceAnim.DURATION_MS;
             // Early detach the nav bar once the endTarget is determined as HOME