aboutsummaryrefslogtreecommitdiffstats
path: root/java/src
diff options
context:
space:
mode:
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();