fix crash when removing contacts

This commit is contained in:
Jehan Monnier 2016-09-29 11:05:54 +02:00
parent a2cd295b8b
commit 5bb787e90e

View file

@ -119,7 +119,7 @@
- (BOOL)isValid {
BOOL hasName = (_contact.firstName.length + _contact.lastName.length > 0);
BOOL hasAddr = ((NSString *)_contact.phoneNumbers[0]).length + ((NSString *)_contact.sipAddresses[0]).length > 0;
BOOL hasAddr = (_contact.phoneNumbers.count + _contact.sipAddresses.count) > 0;
return hasName && hasAddr;
}