Check for nil chatroom in ChatConversationView.m::CellForRowAtIndexPath to avoid recurring crashes in background. Temporary fix.

This commit is contained in:
QuentinArguillere 2022-11-03 15:29:28 +01:00
parent 9fcfe2b8de
commit f3bc7add35

View file

@ -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) {