diff options
author | Alice Yang <alice@google.com> | 2013-03-04 14:45:38 -0800 |
---|---|---|
committer | Alice Yang <alice@google.com> | 2013-03-04 14:45:38 -0800 |
commit | 48ad5213e18a67b3a7ec3375214e3900240b889c (patch) | |
tree | 4c7479b53cebfc0a530008bda365d5431bde96fc | |
parent | c4d46df70d525cb2289bd76fb0b0b12637dbbe23 (diff) | |
download | android_frameworks_ex-48ad5213e18a67b3a7ec3375214e3900240b889c.tar.gz android_frameworks_ex-48ad5213e18a67b3a7ec3375214e3900240b889c.tar.bz2 android_frameworks_ex-48ad5213e18a67b3a7ec3375214e3900240b889c.zip |
Fix NPE.
Missed another place we need null check.
Bug 8312541
Change-Id: I769e1b6ea5e9c028ca46ee896575f0b4a6c4cea5
-rw-r--r-- | chips/src/com/android/ex/chips/RecipientEditTextView.java | 4 |
1 files changed, 2 insertions, 2 deletions
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 @@ public class RecipientEditTextView extends MultiAutoCompleteTextView implements 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())); |