Fix possible NPE in DictionaryFacilitatorForSuggest.

Change-Id: I57792b7417b5f1acbb99e6ea60250eb44b193785
main
Keisuke Kuroyanagi 2014-01-10 21:42:08 +09:00
parent db0adf86a4
commit 5717c63a2b
1 changed files with 1 additions and 0 deletions

View File

@ -410,6 +410,7 @@ public class DictionaryFacilitatorForSuggest {
final int sessionId, final Set<SuggestedWordInfo> suggestionSet) { final int sessionId, final Set<SuggestedWordInfo> suggestionSet) {
for (final String key : mDictionaries.keySet()) { for (final String key : mDictionaries.keySet()) {
final Dictionary dictionary = mDictionaries.get(key); final Dictionary dictionary = mDictionaries.get(key);
if (null == dictionary) continue;
suggestionSet.addAll(dictionary.getSuggestionsWithSessionId(composer, prevWord, suggestionSet.addAll(dictionary.getSuggestionsWithSessionId(composer, prevWord,
proximityInfo, blockOffensiveWords, additionalFeaturesOptions, sessionId)); proximityInfo, blockOffensiveWords, additionalFeaturesOptions, sessionId));
} }