diff options
Diffstat (limited to 'packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java')
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java b/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java index 2623db3..33a36f6 100644 --- a/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java +++ b/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java @@ -530,11 +530,12 @@ public class TaskStackView extends FrameLayout implements TaskStack.TaskStackCal /** Resets the focused task. */ void resetFocusedTask() { - if ((mStack != null) && (0 <= mFocusedTaskIndex) && - (mFocusedTaskIndex < mStack.getTaskCount())) { + if ((0 <= mFocusedTaskIndex) && (mFocusedTaskIndex < mStack.getTaskCount())) { Task t = mStack.getTasks().get(mFocusedTaskIndex); TaskView tv = getChildViewForTask(t); - tv.unsetFocusedTask(); + if (tv != null) { + tv.unsetFocusedTask(); + } } mFocusedTaskIndex = -1; } |