Fix NPE.
Missed another place we need null check.
Bug 8312541
Change-Id: I769e1b6ea5e9c028ca46ee896575f0b4a6c4cea5
diff --git a/chips/src/com/android/ex/chips/RecipientEditTextView.java b/chips/src/com/android/ex/chips/RecipientEditTextView.java
index 191b590..0d24d57 100644
--- a/chips/src/com/android/ex/chips/RecipientEditTextView.java
+++ b/chips/src/com/android/ex/chips/RecipientEditTextView.java
@@ -2508,8 +2508,8 @@
new ArrayList<RecipientChip>(addresses.size());
for (final RecipientChip temp : recipients) {
- if (RecipientEntry.isCreatedRecipient(temp.getEntry()
- .getContactId())
+ if (temp != null && RecipientEntry.isCreatedRecipient(
+ temp.getEntry().getContactId())
&& getSpannable().getSpanStart(temp) != -1) {
if (addresses.contains(temp.getEntry().getDestination())) {
replacements.add(createFreeChip(temp.getEntry()));