From dd57e366eb016d0656789e1f6798b97491dc23be Mon Sep 17 00:00:00 2001 From: Danmei Chen Date: Tue, 26 May 2020 21:20:46 +0200 Subject: [PATCH] fix crash: ChatsListTableView is load before app entering foreground --- Classes/ChatsListTableView.m | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Classes/ChatsListTableView.m b/Classes/ChatsListTableView.m index d2ccb6cec..ff4915d3b 100644 --- a/Classes/ChatsListTableView.m +++ b/Classes/ChatsListTableView.m @@ -150,6 +150,9 @@ static int sorted_history_comparison(LinphoneChatRoom *to_insert, LinphoneChatRo if (cell == nil) cell = [[UIChatCell alloc] initWithIdentifier:kCellId]; + if ([[UIApplication sharedApplication] applicationState] == UIApplicationStateBackground) { + return cell; + } [cell setChatRoom:(LinphoneChatRoom *)bctbx_list_nth_data(_data, (int)[indexPath row])]; [super accessoryForCell:cell atPath:indexPath];