From 268cfa59605508a8c5fab99bf9f91b96886b3eaa Mon Sep 17 00:00:00 2001 From: Benjamin Reis Date: Tue, 30 Jan 2018 14:13:27 +0100 Subject: [PATCH] add check of nulity of cbs user sata --- Classes/ChatsListTableView.m | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Classes/ChatsListTableView.m b/Classes/ChatsListTableView.m index 89fe0a2eb..a4be2aea1 100644 --- a/Classes/ChatsListTableView.m +++ b/Classes/ChatsListTableView.m @@ -180,6 +180,9 @@ static int sorted_history_comparison(LinphoneChatRoom *to_insert, LinphoneChatRo void deletion_chat_room_state_changed(LinphoneChatRoom *cr, LinphoneChatRoomState newState) { ChatsListTableView *view = (__bridge ChatsListTableView *)linphone_chat_room_cbs_get_user_data(linphone_chat_room_get_callbacks(cr)) ?: NULL; + if (!view) + return; + if (newState == LinphoneChatRoomStateDeleted || newState == LinphoneChatRoomStateTerminationFailed) { LinphoneChatRoomCbs *cbs = linphone_chat_room_get_callbacks(cr); linphone_chat_room_cbs_set_state_changed(cbs, NULL);