]> sjero.net Git - linphone/blobdiff - coreapi/friend.c
Aac-eld add missing header according to RFC3640 3.3.6
[linphone] / coreapi / friend.c
index 05a1baeec3a7ed26013cc44a758b614042dc138f..c6dee2440a8d28019c003893123cc2dfde218b0a 100644 (file)
@@ -396,8 +396,8 @@ void linphone_core_add_friend(LinphoneCore *lc, LinphoneFriend *lf)
 void linphone_core_remove_friend(LinphoneCore *lc, LinphoneFriend* fl){
        MSList *el=ms_list_find(lc->friends,(void *)fl);
        if (el!=NULL){
-               lc->friends=ms_list_remove_link(lc->friends,el);
                linphone_friend_destroy((LinphoneFriend*)el->data);
+               lc->friends=ms_list_remove_link(lc->friends,el);
                linphone_core_write_friends_config(lc);
        }
 }