summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chips/src/com/android/ex/chips/RecipientEditTextView.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/chips/src/com/android/ex/chips/RecipientEditTextView.java b/chips/src/com/android/ex/chips/RecipientEditTextView.java
index dc67901..bdc1a58 100644
--- a/chips/src/com/android/ex/chips/RecipientEditTextView.java
+++ b/chips/src/com/android/ex/chips/RecipientEditTextView.java
@@ -2225,6 +2225,9 @@ public class RecipientEditTextView extends MultiAutoCompleteTextView implements
tokenEnd = movePastTerminators(mTokenizer.findTokenEnd(text, tokenStart));
commitChip(tokenStart, tokenEnd, getText());
createdChip = findChip(tokenStart);
+ if (createdChip == null) {
+ break;
+ }
// +1 for the space at the end.
tokenStart = getSpannable().getSpanEnd(createdChip) + 1;
created.add(createdChip);