Commit 1b96a219 authored by Christophe Deschamps's avatar Christophe Deschamps
Browse files

Merge branch 'master' of

parents 82cb8660 55a9850b
Pipeline #30407 passed with stage
in 5 minutes and 3 seconds
......@@ -343,9 +343,7 @@ static const CGFloat MESSAGE_SPACING_PERCENTAGE = 1.f;
- (void) tableView:(UITableView *)tableView deleteRowAtIndex:(NSIndexPath *)indexPath {
[tableView beginUpdates];
LinphoneEventLog *event = [[eventList objectAtIndex:indexPath.row] pointerValue];
// TODO: fix workaround
linphone_chat_room_delete_message(_chatRoom, linphone_event_log_get_chat_message(event));
NSInteger index = indexPath.row + _currentIndex + (totalEventList.count - eventList.count);
if (index < totalEventList.count)
[totalEventList removeObjectAtIndex:index];
......@@ -63,7 +63,11 @@
if (!chatRoom)
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