Fix NPE in InputMethodAndLanguageSettings

Bug: 4422368

Change-Id: I495eb8de9928922b18b37c6658bd8fd8b4ee3e1a
This commit is contained in:
satok
2011-05-14 04:30:45 +09:00
parent e3b5428611
commit 722ea03231

View File

@@ -108,7 +108,7 @@ public class InputMethodAndLanguageSettings extends SettingsPreferenceFragment
final int columnIndex = locales.getColumnIndex(UserDictionary.Words.LOCALE);
do {
final String locale = locales.getString(columnIndex);
if (!prefs.containsKey(locale))
if (locale != null && !prefs.containsKey(locale))
prefs.put(locale, createUserDictionaryPreference(locale, activity, ++order));
} while (locales.moveToNext());
}