From 796940bda53cc8c3c14f8f9390439cf75073e11e Mon Sep 17 00:00:00 2001 From: Jake McGinty Date: Thu, 5 Nov 2015 11:03:05 -0800 Subject: [PATCH] fix ContactSelectionListItem NPE Fixes #4394 Closes #4399 // FREEBIE --- .../securesms/contacts/ContactSelectionListItem.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/org/thoughtcrime/securesms/contacts/ContactSelectionListItem.java b/src/org/thoughtcrime/securesms/contacts/ContactSelectionListItem.java index 6638d1e297..c7b16a6582 100644 --- a/src/org/thoughtcrime/securesms/contacts/ContactSelectionListItem.java +++ b/src/org/thoughtcrime/securesms/contacts/ContactSelectionListItem.java @@ -58,7 +58,9 @@ public class ContactSelectionListItem extends RelativeLayout implements Recipien } else if (!TextUtils.isEmpty(number)) { 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(); }