Merge "Avoid a potential NPE."

This commit is contained in:
TreeHugger Robot
2019-10-30 06:30:19 +00:00
committed by Android (Google) Code Review

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);