diff options
Diffstat (limited to 'java/src')
-rw-r--r-- | java/src/com/android/inputmethod/keyboard/LatinKeyboard.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/java/src/com/android/inputmethod/keyboard/LatinKeyboard.java b/java/src/com/android/inputmethod/keyboard/LatinKeyboard.java index 76eac1ac8..00bf348f2 100644 --- a/java/src/com/android/inputmethod/keyboard/LatinKeyboard.java +++ b/java/src/com/android/inputmethod/keyboard/LatinKeyboard.java @@ -140,7 +140,7 @@ public class LatinKeyboard extends Keyboard { // The threshold is "key width" x 1.25 mSpacebarLanguageSwitchThreshold = (getMostCommonKeyWidth() * 5) / 4; - if (mSpaceKey != null) { + if (mSpaceKey != null && mSpacePreviewIcon != null) { final int slidingIconWidth = Math.max(mSpaceKey.mWidth, (int)(getMinWidth() * SPACEBAR_POPUP_MIN_RATIO)); final int spaceKeyheight = mSpacePreviewIcon.getIntrinsicHeight(); |