diff --git a/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java b/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java index 589e99ea6..1cd6ef249 100644 --- a/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java +++ b/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java @@ -147,7 +147,9 @@ public final class KeyboardSwitcher implements KeyboardState.SwitchActions { public void onHideWindow() { mIsAutoCorrectionActive = false; - mKeyboardView.onHideWindow(); + if (mKeyboardView != null) { + mKeyboardView.onHideWindow(); + } } private void setKeyboard(final Keyboard keyboard) {