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
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user