Merge "Add a safety net for auto-correction." into honeycomb
diff --git a/java/src/com/android/inputmethod/keyboard/LatinKeyboardView.java b/java/src/com/android/inputmethod/keyboard/LatinKeyboardView.java
index ef41cb6..e9d5580 100644
--- a/java/src/com/android/inputmethod/keyboard/LatinKeyboardView.java
+++ b/java/src/com/android/inputmethod/keyboard/LatinKeyboardView.java
@@ -205,10 +205,10 @@
@Override
public boolean onTouchEvent(MotionEvent me) {
LatinKeyboard keyboard = getLatinKeyboard();
+ if (keyboard == null) return true;
// If there was a sudden jump, return without processing the actual motion event.
- if (handleSuddenJump(me))
- return true;
+ if (handleSuddenJump(me)) return true;
// Reset any bounding box controls in the keyboard
if (me.getAction() == MotionEvent.ACTION_DOWN) {