Fix possible NPE in DictionaryFacilitatorForSuggest.
Change-Id: I57792b7417b5f1acbb99e6ea60250eb44b193785main
parent
db0adf86a4
commit
5717c63a2b
|
@ -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));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue