From 9bb59adf27d28a2d4e146c127683c06a3dca600b Mon Sep 17 00:00:00 2001 From: "Tadashi G. Takaoka" Date: Tue, 21 Jun 2011 02:31:33 +0900 Subject: [PATCH] Fix NPE Bug: 4727778 Change-Id: I08f1204d5f77251c197dda7d2b332441f9f7123d --- java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java b/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java index 8657768ee..1218a5abd 100644 --- a/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java +++ b/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java @@ -186,7 +186,7 @@ public class KeyboardSwitcher implements SharedPreferences.OnSharedPreferenceCha public void onSizeChanged() { final int width = mInputMethodService.getWindow().getWindow().getDecorView().getWidth(); - if (width == 0) + if (width == 0 || mCurrentId == null) return; mKeyboardWidth = width; // Set keyboard with new width.