aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin
diff options
context:
space:
mode:
authorKen Wakasa <kwakasa@google.com>2012-08-17 08:12:40 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2012-08-17 08:12:40 -0700
commit1f6e2faa33c28d815fb49117851027b95782c060 (patch)
treefcae75d29e787d3a1833ec00fc6d9e7c8c44cd25 /java/src/com/android/inputmethod/latin
parent33371e886486f3a5b081c6ad8fe4e9c19c78d4e6 (diff)
parente46d12927ee2717788248b05f00b751beaf2a02a (diff)
downloadlatinime-1f6e2faa33c28d815fb49117851027b95782c060.tar.gz
latinime-1f6e2faa33c28d815fb49117851027b95782c060.tar.xz
latinime-1f6e2faa33c28d815fb49117851027b95782c060.zip
am e46d1292: Fix NPE in LatinIME.addToUserHistoryDictionary()
* commit 'e46d12927ee2717788248b05f00b751beaf2a02a': Fix NPE in LatinIME.addToUserHistoryDictionary()
Diffstat (limited to 'java/src/com/android/inputmethod/latin')
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java1
1 files changed, 1 insertions, 0 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index 884e6db29..c20f3a3a9 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -2001,6 +2001,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
private CharSequence addToUserHistoryDictionary(final CharSequence suggestion) {
if (TextUtils.isEmpty(suggestion)) return null;
+ if (mSuggest == null) return null;
// If correction is not enabled, we don't add words to the user history dictionary.
// That's to avoid unintended additions in some sensitive fields, or fields that