From 362ab36cf009d724768e742c3b2e264387efc521 Mon Sep 17 00:00:00 2001 From: Yohei Yukawa Date: Fri, 14 Feb 2014 10:34:13 +0900 Subject: [PATCH] Fix a null object reference crash on Emoji Palette Do nothing if the current EmojiPageKeyboardView is null. BUG: 13006906 Change-Id: I169b70122ec939075b5be033953b48762fd528fc --- .../com/android/inputmethod/keyboard/EmojiPalettesView.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/java/src/com/android/inputmethod/keyboard/EmojiPalettesView.java b/java/src/com/android/inputmethod/keyboard/EmojiPalettesView.java index 50e8163c3..c34464314 100644 --- a/java/src/com/android/inputmethod/keyboard/EmojiPalettesView.java +++ b/java/src/com/android/inputmethod/keyboard/EmojiPalettesView.java @@ -724,7 +724,9 @@ public final class EmojiPalettesView extends LinearLayout implements OnTabChange // canceled. final EmojiPageKeyboardView currentKeyboardView = mActiveKeyboardViews.get(mActivePosition); - currentKeyboardView.releaseCurrentKey(); + if (currentKeyboardView != null) { + currentKeyboardView.releaseCurrentKey(); + } } @Override