aboutsummaryrefslogtreecommitdiffstats
path: root/java/src
diff options
context:
space:
mode:
authorsatok <satok@google.com>2010-06-04 00:51:17 +0900
committersatok <satok@google.com>2010-06-04 00:51:17 +0900
commit88327fb73b517e7723ab419cfc4f65ff65126c98 (patch)
treef560d68e3bd93b51d58bf74de8081cc211ce65e4 /java/src
parentdac53d9c7db2f948e3d51686e383e65b076ce51d (diff)
downloadlatinime-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.java10
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();