Avoid a potential NPE.

Test: atest ActivityLifecycleSplitScreenTests
Bug: 142345211
Change-Id: Iad8dcfa8aa2cfdbe5f36d7747d1b7421abe27921
This commit is contained in:
Alan Stokes
2019-10-29 14:53:23 +00:00
parent bffb19642d
commit 809120016c

View File

@@ -2354,7 +2354,7 @@ class ActivityStarter {
mMovedToFront = true;
}
if (launchStack.topTask() == null) {
if (launchStack != null && launchStack.topTask() == null) {
// The task does not need to be reparented to the launch stack. Remove the
// launch stack if there is no activity in it.
Slog.w(TAG, "Removing an empty stack: " + launchStack);