Fix NPE that happens only in some unit tests

Bug: 14922410
Change-Id: Ica801e102d302e9faa7c24721b37634f1e812af3
diff --git a/java/src/com/android/inputmethod/keyboard/EmojiPalettesView.java b/java/src/com/android/inputmethod/keyboard/EmojiPalettesView.java
index a02ff11..55e8071 100644
--- a/java/src/com/android/inputmethod/keyboard/EmojiPalettesView.java
+++ b/java/src/com/android/inputmethod/keyboard/EmojiPalettesView.java
@@ -153,7 +153,9 @@
             textView.setText(mEmojiCategory.getCategoryLabel(categoryId));
             textView.setTypeface(Typeface.DEFAULT_BOLD);
             textView.setContentDescription(mEmojiCategory.getAccessibilityDescription(categoryId));
-            textView.setTextColor(mTabLabelColor);
+            if (mTabLabelColor != null) {
+                textView.setTextColor(mTabLabelColor);
+            }
             tspec.setIndicator(textView);
         }
         host.addTab(tspec);