diff options
| author | 2010-12-06 14:08:12 +0900 | |
|---|---|---|
| committer | 2010-12-06 14:14:50 +0900 | |
| commit | bd81c3fe344ab018fad1d8e0370ef25231b51a22 (patch) | |
| tree | 59be77d88b42184314336264f6f1c17322973c6c | |
| parent | 1921eab4e7e61bf4e50b09efa4513853521e5281 (diff) | |
Fix null pointer exception
Bug: 3250622
Change-Id: I0913f10c7deb984d2b1a51701dddf765a060592e
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/tablet/InputMethodButton.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/InputMethodButton.java b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/InputMethodButton.java index 7e03e2a94491..5f14f742b572 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/InputMethodButton.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/InputMethodButton.java @@ -175,10 +175,12 @@ public class InputMethodButton extends ImageView { icon = getShortcutInputMethodAndSubtypeDrawable(); break; } - if (icon == null) { - mIcon.setImageResource(R.drawable.ic_sysbar_ime_default); - } else { - mIcon.setImageDrawable(icon); + if (mIcon != null) { + if (icon == null) { + mIcon.setImageResource(R.drawable.ic_sysbar_ime_default); + } else { + mIcon.setImageDrawable(icon); + } } } |