Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a554a02f authored by Winson Chung's avatar Winson Chung
Browse files

Fix NPE from accessing pausing tasks

- It's possible for mPausingTasks to be unset between
  startRecentsTransition() and startAnimation(), and in these cases
  canceling with a screenshot can not take the snapshots as we have no
  leashes of the tasks in the animation itself.  For now, just cancel
  the transition without the snapshots.

Fixes: 286874048
Test: Just adding an NPE check
Change-Id: Ie1315d8f6451cfb9b2ee2782c7d89db3cbb36aac
parent 0404e1bc
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -313,7 +313,7 @@ public class RecentsTransitionHandler implements Transitions.TransitionHandler {
        private Pair<int[], TaskSnapshot[]> getSnapshotsForPausingTasks() {
            int[] taskIds = null;
            TaskSnapshot[] snapshots = null;
            if (mPausingTasks.size() > 0) {
            if (mPausingTasks != null && mPausingTasks.size() > 0) {
                taskIds = new int[mPausingTasks.size()];
                snapshots = new TaskSnapshot[mPausingTasks.size()];
                try {