From c9f203805ca23276fcdcdc79b9298bc1d413ad98 Mon Sep 17 00:00:00 2001 From: "Tadashi G. Takaoka" Date: Thu, 1 Dec 2011 16:26:09 +0900 Subject: [PATCH] Fix potential NPE Change-Id: I00e7cd521bafd2705ebc2a59d63b7bfc4fe178ba --- java/src/com/android/inputmethod/keyboard/PointerTracker.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/java/src/com/android/inputmethod/keyboard/PointerTracker.java b/java/src/com/android/inputmethod/keyboard/PointerTracker.java index 4e8765dcc..d69c8c8a3 100644 --- a/java/src/com/android/inputmethod/keyboard/PointerTracker.java +++ b/java/src/com/android/inputmethod/keyboard/PointerTracker.java @@ -480,7 +480,8 @@ public class PointerTracker { Key key = onDownKey(x, y, eventTime); // Sliding key is allowed when 1) enabled by configuration, 2) this pointer starts sliding // from modifier key, or 3) this pointer's KeyDetector always allows sliding input. - mIsAllowedSlidingKeyInput = sConfigSlidingKeyInputEnabled || key.isModifier() + mIsAllowedSlidingKeyInput = sConfigSlidingKeyInputEnabled + || (key != null && key.isModifier()) || mKeyDetector.alwaysAllowsSlidingInput(); mKeyboardLayoutHasBeenChanged = false; mKeyAlreadyProcessed = false;