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

Commit 991146f8 authored by Craig Mautner's avatar Craig Mautner
Browse files

Don't null class member before using it.

Changing the order of detachStack() and usage of mDisplayContent
fixes NPE.

Fixes bug 12823709.

Change-Id: I04760b1d6fd5d3ffc49b99ca4acb47bf7e61cb46
parent 3cb62db2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -371,11 +371,11 @@ public class TaskStack {
                (mDisplayContent.mDeferredActions & DisplayContent.DEFER_DETACH) != 0 &&
                !isAnimating()) {
            mDisplayContent.mDeferredActions &= ~DisplayContent.DEFER_DETACH;
            mService.detachStack(mStackId);
            if ((mDisplayContent.mDeferredActions & DisplayContent.DEFER_REMOVAL) != 0) {
                mDisplayContent.mDeferredActions &= ~DisplayContent.DEFER_REMOVAL;
                mService.onDisplayRemoved(mDisplayContent.getDisplayId());
            }
            mService.detachStack(mStackId);
        }
        for (int taskNdx = mTasks.size() - 1; taskNdx >= 0; --taskNdx) {
            final Task task = mTasks.get(taskNdx);