fix crash on NULL subject

This commit is contained in:
Benjamin Reis 2018-02-16 11:29:18 +01:00
parent c78d05a342
commit 3df2a4a01e
2 changed files with 1 additions and 2 deletions

View file

@ -127,7 +127,6 @@
if (!addr)
return cell;
cell.linphoneImage.hidden = !linphoneContact;
cell.displayNameLabel.text = [FastAddressBook displayNameForAddress:addr];
cell.addressLabel.text = [NSString stringWithUTF8String:linphone_address_as_string(addr)];

View file

@ -77,7 +77,7 @@
}
} else {
const char *subject = linphone_chat_room_get_subject(chatRoom);
_addressLabel.text = [NSString stringWithUTF8String:subject];
_addressLabel.text = [NSString stringWithUTF8String:subject ?: LINPHONE_DUMMY_SUBJECT];
[_avatarImage setImage:[UIImage imageNamed:@"chat_group_avatar.png"] bordered:NO withRoundedRadius:YES];
}