prevent NPE in GroupCreateActivity

Occurs when a returned Recipient is null when returning from contact
selection activity.

Fixes #2466
// FREEBIE
pull/1/head
Jake McGinty 10 years ago
parent 35dabaf1e5
commit 442f56cdc3

@ -387,8 +387,9 @@ public class GroupCreateActivity extends PassphraseRequiredActionBarActivity {
Recipient recipient = RecipientFactory.getRecipientsFromString(this, numberData.number, false) Recipient recipient = RecipientFactory.getRecipientsFromString(this, numberData.number, false)
.getPrimaryRecipient(); .getPrimaryRecipient();
if (!selectedContacts.contains(recipient) if (!selectedContacts.contains(recipient) &&
&& (existingContacts == null || !existingContacts.contains(recipient))) { (existingContacts == null || !existingContacts.contains(recipient)) &&
recipient != null) {
addSelectedContact(recipient); addSelectedContact(recipient);
} }
} catch (RecipientFormattingException e) { } catch (RecipientFormattingException e) {

Loading…
Cancel
Save