From bec7d63c9cad875bb127786d61ee34b4d609db59 Mon Sep 17 00:00:00 2001 From: Daniel Sandler Date: Tue, 15 Feb 2011 14:24:58 -0500 Subject: [PATCH] Fix NPE. I believe this is the result of a race condition involving multiple tickers under load. The fix simply guards against the null pointer. Bug: 3448450 Change-Id: Icc78c89890f0a41c574f7077b1b450e9fd4ca28b --- .../com/android/systemui/statusbar/tablet/TabletTicker.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletTicker.java b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletTicker.java index a072aedd08b67..a8f4262aff79b 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletTicker.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletTicker.java @@ -158,7 +158,9 @@ public class TabletTicker private void advance() { // Out with the old... if (mCurrentView != null) { - mWindow.removeView(mCurrentView); + if (mWindow != null) { + mWindow.removeView(mCurrentView); + } mCurrentView = null; mCurrentKey = null; mCurrentNotification = null;