mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-18 03:28:07 +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;
|
||||
linphone_friend_unref(lf);
|
||||
list->friends = bctbx_list_erase_link(list->friends, elem);
|
||||
bctbx_iterator_t * it = bctbx_map_cchar_find_key(list->friends_map, lf->refkey);
|
||||
bctbx_map_cchar_erase(list->friends_map, it);
|
||||
if(lf->refkey) {
|
||||
bctbx_iterator_t * it = bctbx_map_cchar_find_key(list->friends_map, lf->refkey);
|
||||
bctbx_map_cchar_erase(list->friends_map, it);
|
||||
}
|
||||
return LinphoneFriendListOK;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue