mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-04-26 20:08:34 +00:00
Do not try to erase friend from map if ref key is null
This commit is contained in:
parent
477a3266e9
commit
eeebd4aa4f
1 changed files with 4 additions and 2 deletions
|
|
@ -585,8 +585,10 @@ static LinphoneFriendListStatus _linphone_friend_list_remove_friend(LinphoneFrie
|
||||||
lf->friend_list = NULL;
|
lf->friend_list = NULL;
|
||||||
linphone_friend_unref(lf);
|
linphone_friend_unref(lf);
|
||||||
list->friends = bctbx_list_erase_link(list->friends, elem);
|
list->friends = bctbx_list_erase_link(list->friends, elem);
|
||||||
bctbx_iterator_t * it = bctbx_map_cchar_find_key(list->friends_map, lf->refkey);
|
if(lf->refkey) {
|
||||||
bctbx_map_cchar_erase(list->friends_map, it);
|
bctbx_iterator_t * it = bctbx_map_cchar_find_key(list->friends_map, lf->refkey);
|
||||||
|
bctbx_map_cchar_erase(list->friends_map, it);
|
||||||
|
}
|
||||||
return LinphoneFriendListOK;
|
return LinphoneFriendListOK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue