am ffb60406: am 87a5af3e: Break out of infinite loop once we detect an error.
* commit 'ffb60406a521e38c6f5fb8567d332a60a4454803':
Break out of infinite loop once we detect an error.
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 @@
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);