diff options
author | 2010-06-04 00:51:17 +0900 | |
---|---|---|
committer | 2010-06-04 00:51:17 +0900 | |
commit | 88327fb73b517e7723ab419cfc4f65ff65126c98 (patch) | |
tree | f560d68e3bd93b51d58bf74de8081cc211ce65e4 /java/src | |
parent | dac53d9c7db2f948e3d51686e383e65b076ce51d (diff) | |
download | latinime-88327fb73b517e7723ab419cfc4f65ff65126c98.tar.gz latinime-88327fb73b517e7723ab419cfc4f65ff65126c98.tar.xz latinime-88327fb73b517e7723ab419cfc4f65ff65126c98.zip |
Fix NPE onDestroy
Change-Id: I6aa1951fd3d69e07d1fbc7712fe2526dd9a5ef57
Diffstat (limited to 'java/src')
-rw-r--r-- | java/src/com/android/inputmethod/latin/LatinIME.java | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index 6d620968a..e4f096628 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -355,10 +355,14 @@ public class LatinIME extends InputMethodService @Override public void onDestroy() { - mUserDictionary.close(); - mContactsDictionary.close(); + if (mUserDictionary != null) { + mUserDictionary.close(); + } + if (mContactsDictionary != null) { + mContactsDictionary.close(); + } unregisterReceiver(mReceiver); - if (VOICE_INSTALLED) { + if (VOICE_INSTALLED && mVoiceInput != null) { mVoiceInput.destroy(); } LatinImeLogger.commit(); |