Merge "Fix: NPE in isValidWord after dictionaries are closed."

This commit is contained in:
Keisuke Kuroyanagi 2014-03-27 03:12:07 +00:00 committed by Android (Google) Code Review
commit 3c38e1f269

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()) {