Fix NPE onDestroy

Change-Id: I6aa1951fd3d69e07d1fbc7712fe2526dd9a5ef57
main
satok 2010-06-04 00:51:17 +09:00
parent dac53d9c7d
commit 88327fb73b
1 changed files with 7 additions and 3 deletions

View File

@ -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();