From ae4576e5e7af0f7719067ce50661fdd73694ea0f Mon Sep 17 00:00:00 2001 From: Benjamin Reis Date: Fri, 6 Oct 2017 15:35:55 +0200 Subject: [PATCH] fix crash --- Classes/LinphoneUI/UIChatCell.m | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Classes/LinphoneUI/UIChatCell.m b/Classes/LinphoneUI/UIChatCell.m index 82edb07f9..225761f06 100644 --- a/Classes/LinphoneUI/UIChatCell.m +++ b/Classes/LinphoneUI/UIChatCell.m @@ -69,8 +69,10 @@ [_avatarImage setImage:[UIImage imageNamed:@"chat_group_avatar.png"] bordered:NO withRoundedRadius:YES]; } else { const LinphoneAddress *addr = linphone_chat_room_get_peer_address(chatRoom); - [ContactDisplay setDisplayNameLabel:_addressLabel forAddress:addr]; - [_avatarImage setImage:[FastAddressBook imageForAddress:addr] bordered:NO withRoundedRadius:YES]; + if(addr) { + [ContactDisplay setDisplayNameLabel:_addressLabel forAddress:addr]; + [_avatarImage setImage:[FastAddressBook imageForAddress:addr] bordered:NO withRoundedRadius:YES]; + } } LinphoneChatMessage *last_message = linphone_chat_room_get_user_data(chatRoom);