From 7b516d496d51101e5d9f37182e35ecc7a1de4765 Mon Sep 17 00:00:00 2001 From: Keisuke Kuroyanagi Date: Thu, 27 Mar 2014 12:03:58 +0900 Subject: [PATCH] Fix: NPE in isValidWord after dictionaries are closed. Bug: 13650542 Change-Id: I1bdc838fca48d6ef12db5e70d40273d1236128d1 --- .../inputmethod/latin/DictionaryFacilitatorForSuggest.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/java/src/com/android/inputmethod/latin/DictionaryFacilitatorForSuggest.java b/java/src/com/android/inputmethod/latin/DictionaryFacilitatorForSuggest.java index 8b8d5776e..ae2d7c9c6 100644 --- a/java/src/com/android/inputmethod/latin/DictionaryFacilitatorForSuggest.java +++ b/java/src/com/android/inputmethod/latin/DictionaryFacilitatorForSuggest.java @@ -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 dictMap = dictionaries.mDictMap; for (final Dictionary dictionary : dictMap.values()) {