mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-02-03 03:39:27 +00:00
Contact: try to not crash when reverting address book
This commit is contained in:
parent
9cc1a2c9f2
commit
75f66d8691
1 changed files with 6 additions and 4 deletions
|
|
@ -118,12 +118,14 @@ static void sync_address_book(ABAddressBookRef addressBook, CFDictionaryRef info
|
|||
}
|
||||
|
||||
- (void)selectContact:(ABRecordRef)acontact andReload:(BOOL)reload {
|
||||
_contact = NULL;
|
||||
[self resetData];
|
||||
|
||||
_emptyLabel.hidden = (acontact != NULL);
|
||||
if (self.isEditing) {
|
||||
[self setEditing:FALSE];
|
||||
}
|
||||
ABAddressBookRevert(addressBook);
|
||||
|
||||
_contact = acontact;
|
||||
_emptyLabel.hidden = (_contact != NULL);
|
||||
|
||||
[_avatarImage setImage:[FastAddressBook imageForContact:_contact thumbnail:NO] bordered:NO withRoundedRadius:YES];
|
||||
[ContactDisplay setDisplayNameLabel:_nameLabel forContact:acontact];
|
||||
[_tableController setContact:[[Contact alloc] initWithPerson:_contact]];
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue