fix ContactSelectionListItem NPE

Fixes #4394
Closes #4399
// FREEBIE
This commit is contained in:
Jake McGinty 2015-11-05 11:03:05 -08:00 committed by Moxie Marlinspike
parent 00a18f58a7
commit 796940bda5

View File

@ -58,7 +58,9 @@ public class ContactSelectionListItem extends RelativeLayout implements Recipien
} else if (!TextUtils.isEmpty(number)) { } else if (!TextUtils.isEmpty(number)) {
this.recipients = RecipientFactory.getRecipientsFromString(getContext(), number, true); this.recipients = RecipientFactory.getRecipientsFromString(getContext(), number, true);
if (this.recipients.getPrimaryRecipient().getName() != null) { if (this.recipients.getPrimaryRecipient() != null &&
this.recipients.getPrimaryRecipient().getName() != null)
{
name = this.recipients.getPrimaryRecipient().getName(); name = this.recipients.getPrimaryRecipient().getName();
} }