Fix: NPE in isValidWord after dictionaries are closed.

Bug: 13650542
Change-Id: I1bdc838fca48d6ef12db5e70d40273d1236128d1
This commit is contained in:
Keisuke Kuroyanagi 2014-03-27 12:03:58 +09:00
parent eddbb7ac88
commit 7b516d496d

View File

@ -480,6 +480,9 @@ public class DictionaryFacilitatorForSuggest {
return false;
}
final Dictionaries dictionaries = mDictionaries;
if (dictionaries.mLocale == null) {
return false;
}
final String lowerCasedWord = word.toLowerCase(dictionaries.mLocale);
final Map<String, Dictionary> dictMap = dictionaries.mDictMap;
for (final Dictionary dictionary : dictMap.values()) {