aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAmith Yamasani <yamasani@google.com>2010-01-28 12:34:01 -0800
committerAmith Yamasani <yamasani@google.com>2010-01-28 12:35:29 -0800
commitb8f98ad014ac6f1d453128f902dba67ebebff1d3 (patch)
tree5e90e060f4277687387618dcd01862a2e200b798 /src
parenta16ff1b19e8e012cf37a234bae67b994e805bfb1 (diff)
downloadlatinime-b8f98ad014ac6f1d453128f902dba67ebebff1d3.tar.gz
latinime-b8f98ad014ac6f1d453128f902dba67ebebff1d3.tar.xz
latinime-b8f98ad014ac6f1d453128f902dba67ebebff1d3.zip
Fix a crash when starting up LatinIME or changing orientation. Bug:2403575
Diffstat (limited to 'src')
-rw-r--r--src/com/android/inputmethod/latin/LatinIME.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/com/android/inputmethod/latin/LatinIME.java b/src/com/android/inputmethod/latin/LatinIME.java
index 5d9b5e91d..c24268dd7 100644
--- a/src/com/android/inputmethod/latin/LatinIME.java
+++ b/src/com/android/inputmethod/latin/LatinIME.java
@@ -793,7 +793,9 @@ public class LatinIME extends InputMethodService
}
mKeyboardSwitcher.setInputLocale(new Locale(mInputLanguage),
getSelectedInputLanguages() != null);
- mKeyboardSwitcher.setVoiceMode(mEnableVoice, mVoiceOnPrimary);
+ if (mInputView != null) {
+ mKeyboardSwitcher.setVoiceMode(mEnableVoice, mVoiceOnPrimary);
+ }
mKeyboardSwitcher.makeKeyboards(true);
}