From 0de529b4cac458b2d561060d3ae2c7f7f82b676d Mon Sep 17 00:00:00 2001 From: Ken Wakasa Date: Sat, 3 May 2014 00:33:41 +0900 Subject: [PATCH] Fix NPE Follow up to I2b0ec091a11aa8a495794d633efecb6d8b818f42 bug: 14488351 Change-Id: Ic88adbd6775910f35338d798dc0d5493715708e4 --- .../com/android/inputmethod/keyboard/KeyboardSwitcher.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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) {