fix crash

This commit is contained in:
Simon Morlat 2016-01-06 14:43:39 +01:00
parent 849ef0f9ed
commit 49ad4b81c6

View file

@ -253,7 +253,10 @@ LinphoneFriendList * linphone_friend_list_ref(LinphoneFriendList *list) {
void _linphone_friend_list_release(LinphoneFriendList *list){ void _linphone_friend_list_release(LinphoneFriendList *list){
/*drops all references to core and unref*/ /*drops all references to core and unref*/
list->lc = NULL; list->lc = NULL;
if (list->event != NULL) linphone_event_unref(list->event); if (list->event != NULL) {
linphone_event_unref(list->event);
list->event = NULL;
}
list->friends = ms_list_free_with_data(list->friends, (void (*)(void *))_linphone_friend_release); list->friends = ms_list_free_with_data(list->friends, (void (*)(void *))_linphone_friend_release);
belle_sip_object_unref(list); belle_sip_object_unref(list);
} }