Commit 55a9850b authored by QuentinArguillere's avatar QuentinArguillere
Browse files

Fix a crash that could happen when changing view while deleting a chatroom

parent 1fde3a87
Pipeline #30392 passed with stage
in 4 minutes and 54 seconds
......@@ -63,7 +63,11 @@
if (!chatRoom)
continue;
linphone_chat_room_remove_callbacks(chatRoom, linphone_chat_room_get_current_callbacks(chatRoom));
LinphoneChatRoomCbs *cbs = linphone_chat_room_get_current_callbacks(chatRoom);
if (cbs) {// If the view is getting changed while a chatroom deletion is in progress, the callbacks may already have been deleted despite the chatroom still being there, causing a potential crash.
linphone_chat_room_remove_callbacks(chatRoom, cbs);
}
_chatRooms = _chatRooms->next;
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment