From 9dcd761b6df3ac34924c4afc09a7cbc398884800 Mon Sep 17 00:00:00 2001 From: QuentinArguillere Date: Thu, 3 Feb 2022 11:14:39 +0100 Subject: [PATCH] Fix crash when opening chatroom with a different orientation than the one it was previously on before going into background --- Classes/ChatConversationView.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Classes/ChatConversationView.m b/Classes/ChatConversationView.m index 81b1ee6fa..b6cb0751e 100644 --- a/Classes/ChatConversationView.m +++ b/Classes/ChatConversationView.m @@ -316,6 +316,7 @@ static UICompositeViewDescription *compositeDescription = nil; - (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation { [super didRotateFromInterfaceOrientation:fromInterfaceOrientation]; if ([[UIApplication sharedApplication] applicationState] == UIApplicationStateBackground) { + [self refreshImageDrawer]; return; } composingVisible = !composingVisible; @@ -1679,7 +1680,7 @@ void on_chat_room_conference_alert(LinphoneChatRoom *cr, const LinphoneEventLog } - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { - return [self canAdminEphemeral:_chatRoom] ? 3 : 2; + return (_chatRoom && [self canAdminEphemeral:_chatRoom]) ? 3 : 2; } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {