From f0d6058b9ecf7b26f2418edc66041c3e0af928e1 Mon Sep 17 00:00:00 2001 From: "Tadashi G. Takaoka" Date: Sun, 17 Jul 2011 16:37:01 -0700 Subject: [PATCH] Fix NPE Bug: 5030817 Change-Id: I13133abb308d9f0c8169b6ea3fc0913ce5dda3d6 --- java/src/com/android/inputmethod/keyboard/KeyboardView.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/java/src/com/android/inputmethod/keyboard/KeyboardView.java b/java/src/com/android/inputmethod/keyboard/KeyboardView.java index e31aa8478..2e0683115 100644 --- a/java/src/com/android/inputmethod/keyboard/KeyboardView.java +++ b/java/src/com/android/inputmethod/keyboard/KeyboardView.java @@ -142,7 +142,9 @@ public class KeyboardView extends View implements PointerTracker.DrawingProxy { keyboardView.showKey(msg.arg1, tracker); break; case MSG_DISMISS_KEY_PREVIEW: - keyboardView.mPreviewText.setVisibility(View.INVISIBLE); + if (keyboardView.mPreviewText != null) { + keyboardView.mPreviewText.setVisibility(View.INVISIBLE); + } break; } }