am c4d46df7: Fix NPE.
* commit 'c4d46df70d525cb2289bd76fb0b0b12637dbbe23':
Fix NPE.
diff --git a/chips/src/com/android/ex/chips/RecipientEditTextView.java b/chips/src/com/android/ex/chips/RecipientEditTextView.java
index f6cf877..bfd380a 100644
--- a/chips/src/com/android/ex/chips/RecipientEditTextView.java
+++ b/chips/src/com/android/ex/chips/RecipientEditTextView.java
@@ -2243,6 +2243,7 @@
}
}
+ @Override
public <T extends ListAdapter & Filterable> void setAdapter(T adapter) {
super.setAdapter(adapter);
((BaseRecipientAdapter) adapter)
@@ -2484,8 +2485,8 @@
new ArrayList<RecipientChip>();
for (final RecipientChip temp : recipients) {
RecipientEntry entry = null;
- if (RecipientEntry.isCreatedRecipient(temp.getEntry()
- .getContactId())
+ if (temp != null && RecipientEntry.isCreatedRecipient(
+ temp.getEntry().getContactId())
&& getSpannable().getSpanStart(temp) != -1) {
// Replace this.
entry = createValidatedEntry(