Merge "Fix NPE that happens occasionally on start-up" into sc-v2-dev am: 8a0e91b330

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

Change-Id: I20c2eea060fc170e888d4aa8ec9e834507f85ee5
diff --git a/quickstep/src/com/android/launcher3/QuickstepTransitionManager.java b/quickstep/src/com/android/launcher3/QuickstepTransitionManager.java
index f06447b..494b953 100644
--- a/quickstep/src/com/android/launcher3/QuickstepTransitionManager.java
+++ b/quickstep/src/com/android/launcher3/QuickstepTransitionManager.java
@@ -1124,6 +1124,7 @@
             if (target.mode == mode && target.taskInfo != null
                     // Compare component name instead of task-id because transitions will promote
                     // the target up to the root task while getTaskId returns the leaf.
+                    && target.taskInfo.topActivity != null
                     && target.taskInfo.topActivity.equals(mLauncher.getComponentName())) {
                 return true;
             }