mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-07 05:53:06 +00:00
Fix crash when the entered uri is invalid
This commit is contained in:
parent
4348f41040
commit
7c1668314b
1 changed files with 4 additions and 0 deletions
|
|
@ -444,6 +444,10 @@ LinphoneFriend *linphone_core_get_friend_by_address(const LinphoneCore *lc, cons
|
|||
}
|
||||
username=linphone_address_get_username(puri);
|
||||
domain=linphone_address_get_domain(puri);
|
||||
if (domain==NULL) {
|
||||
linphone_address_destroy(puri);
|
||||
return NULL;
|
||||
}
|
||||
for(elem=lc->friends;elem!=NULL;elem=ms_list_next(elem)){
|
||||
lf=(LinphoneFriend*)elem->data;
|
||||
const char *it_username=linphone_address_get_username(lf->uri);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue