From 49ad4b81c6cd5759e74a5f2aa27409a09f3e43fa Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Wed, 6 Jan 2016 14:43:39 +0100 Subject: [PATCH] fix crash --- coreapi/friendlist.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/coreapi/friendlist.c b/coreapi/friendlist.c index e82946a0f..feba9bde3 100644 --- a/coreapi/friendlist.c +++ b/coreapi/friendlist.c @@ -253,7 +253,10 @@ LinphoneFriendList * linphone_friend_list_ref(LinphoneFriendList *list) { void _linphone_friend_list_release(LinphoneFriendList *list){ /*drops all references to core and unref*/ 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); belle_sip_object_unref(list); }