Settings: fix crash when adding an account without assistant

This commit is contained in:
Gautier Pelloux-Prayer 2015-10-14 14:21:43 +02:00
parent 7aab773e3f
commit 5695787f89
2 changed files with 2 additions and 3 deletions

View file

@ -519,8 +519,6 @@ extern void linphone_iphone_log_handler(int lev, const char *fmt, va_list args);
// was a new proxy config, add it
linphone_core_add_proxy_config(lc, proxyCfg);
linphone_core_set_default_proxy_config(lc, proxyCfg);
// reload address book to prepend proxy config domain to contacts' phone number
[[[LinphoneManager instance] fastAddressBook] reload];
}
bad_proxy:
@ -545,6 +543,7 @@ extern void linphone_iphone_log_handler(int lev, const char *fmt, va_list args);
otherButtonTitles:nil] show];
}
}
// reload address book to prepend proxy config domain to contacts' phone number
[[[LinphoneManager instance] fastAddressBook] reload];
}

View file

@ -183,8 +183,8 @@ static void sync_address_book(ABAddressBookRef addressBook, CFDictionaryRef info
}
- (void)loadData {
ABAddressBookRevert(addressBook);
@synchronized(addressBookMap) {
ABAddressBookRevert(addressBook);
[addressBookMap removeAllObjects];
CFArrayRef lContacts = ABAddressBookCopyArrayOfAllPeople(addressBook);