From f0c5c07341b2d9a360b8c0496f3bc4126514401d Mon Sep 17 00:00:00 2001 From: QuentinArguillere Date: Wed, 9 Jun 2021 16:58:05 +0200 Subject: [PATCH] Check that address was successfully created before unreferencing it --- Classes/ChatConversationInfoView.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Classes/ChatConversationInfoView.m b/Classes/ChatConversationInfoView.m index c277bac97..ef9d61714 100644 --- a/Classes/ChatConversationInfoView.m +++ b/Classes/ChatConversationInfoView.m @@ -313,7 +313,8 @@ static UICompositeViewDescription *compositeDescription = nil; cell.adminButton.hidden = _create || (!_imAdmin && !cell.adminLabel.enabled) || ![_oldContacts containsObject:cell.uri]; cell.adminButton.userInteractionEnabled = _imAdmin; cell.removeButton.hidden = !_create && !_imAdmin; - linphone_address_unref(addr); + if (addr) + linphone_address_unref(addr); return cell; }