prevent NPE in GroupCreateActivity

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

Fixes #2466
// FREEBIE
fork-5.53.8
Jake McGinty 2015-02-12 13:34:40 -08:00
rodzic 35dabaf1e5
commit 442f56cdc3
1 zmienionych plików z 3 dodań i 2 usunięć

Wyświetl plik

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