From f3bc7add35ecfa6baf174c8f635bed1711df4e97 Mon Sep 17 00:00:00 2001 From: QuentinArguillere Date: Thu, 3 Nov 2022 15:29:28 +0100 Subject: [PATCH] Check for nil chatroom in ChatConversationView.m::CellForRowAtIndexPath to avoid recurring crashes in background. Temporary fix. --- Classes/ChatConversationView.m | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Classes/ChatConversationView.m b/Classes/ChatConversationView.m index 4bf883fdd..c073052b8 100644 --- a/Classes/ChatConversationView.m +++ b/Classes/ChatConversationView.m @@ -1873,6 +1873,11 @@ void on_chat_room_conference_alert(LinphoneChatRoom *cr, const LinphoneEventLog - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { UITableViewCell *cell = [[UITableViewCell alloc] init]; + if (!_chatRoom) { + // Workaround to avoid crash in background for release 4.7. This shouldn't happen though, so there may be a deeper issue not found yet + return cell; + } + int firstIndex = isOneToOne ? 0 : 1; if (!isOneToOne && indexPath.row == 0) {