diff --git a/java/src/com/android/inputmethod/latin/settings/SettingsFragment.java b/java/src/com/android/inputmethod/latin/settings/SettingsFragment.java index 7d307a4f1..2cee130ec 100644 --- a/java/src/com/android/inputmethod/latin/settings/SettingsFragment.java +++ b/java/src/com/android/inputmethod/latin/settings/SettingsFragment.java @@ -71,6 +71,9 @@ public final class SettingsFragment extends InputMethodSettingsFragment // Because the "%s" summary trick of {@link ListPreference} doesn't work properly before // KitKat, we need to update the summary programmatically. final ListPreference listPreference = (ListPreference)findPreference(prefKey); + if (listPreference == null) { + return; + } final CharSequence entries[] = listPreference.getEntries(); final int entryIndex = listPreference.findIndexOfValue(listPreference.getValue()); listPreference.setSummary(entryIndex < 0 ? null : entries[entryIndex]);