diff --git a/java/src/com/android/inputmethod/keyboard/Key.java b/java/src/com/android/inputmethod/keyboard/Key.java index 33b55b5d3..4b4ffdbaf 100644 --- a/java/src/com/android/inputmethod/keyboard/Key.java +++ b/java/src/com/android/inputmethod/keyboard/Key.java @@ -275,7 +275,7 @@ public class Key { } private static boolean isDigitPopupCharacter(CharSequence label) { - return label.length() == 1 && Character.isDigit(label.charAt(0)); + return label != null && label.length() == 1 && Character.isDigit(label.charAt(0)); } private static CharSequence[] filterOutDigitPopupCharacters(CharSequence[] popupCharacters) {