mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-04-27 21:26:21 +00:00
fix crash when creating chat conversation with no contacts
This commit is contained in:
parent
c286b23450
commit
bfa84a37fe
1 changed files with 15 additions and 14 deletions
|
|
@ -67,7 +67,7 @@ static void sync_address_book(ABAddressBookRef addressBook, CFDictionaryRef info
|
||||||
NSString *normalizedSipAddress = [FastAddressBook normalizeSipURI:[NSString stringWithUTF8String:uri]];
|
NSString *normalizedSipAddress = [FastAddressBook normalizeSipURI:[NSString stringWithUTF8String:uri]];
|
||||||
contact = [FastAddressBook getContact:normalizedSipAddress];
|
contact = [FastAddressBook getContact:normalizedSipAddress];
|
||||||
ms_free(uri);
|
ms_free(uri);
|
||||||
}
|
|
||||||
if (!contact) {
|
if (!contact) {
|
||||||
LinphoneFriend *friend = linphone_core_find_friend(LC, address);
|
LinphoneFriend *friend = linphone_core_find_friend(LC, address);
|
||||||
MSList *numbers = linphone_friend_get_phone_numbers(friend);
|
MSList *numbers = linphone_friend_get_phone_numbers(friend);
|
||||||
|
|
@ -84,6 +84,7 @@ static void sync_address_book(ABAddressBookRef addressBook, CFDictionaryRef info
|
||||||
numbers = numbers->next;
|
numbers = numbers->next;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return contact;
|
return contact;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue