summaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorsatok <satok@google.com>2010-12-06 14:08:12 +0900
committersatok <satok@google.com>2010-12-06 14:14:50 +0900
commitbd81c3fe344ab018fad1d8e0370ef25231b51a22 (patch)
tree59be77d88b42184314336264f6f1c17322973c6c /packages
parent1921eab4e7e61bf4e50b09efa4513853521e5281 (diff)
downloadframeworks_base-bd81c3fe344ab018fad1d8e0370ef25231b51a22.zip
frameworks_base-bd81c3fe344ab018fad1d8e0370ef25231b51a22.tar.gz
frameworks_base-bd81c3fe344ab018fad1d8e0370ef25231b51a22.tar.bz2
Fix null pointer exception
Bug: 3250622 Change-Id: I0913f10c7deb984d2b1a51701dddf765a060592e
Diffstat (limited to 'packages')
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/tablet/InputMethodButton.java10
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 7e03e2a..5f14f74 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);
+ }
}
}