From 9655948f35dd84ec77b3e6d7df3934c2ffe93aa5 Mon Sep 17 00:00:00 2001 From: Christophe Deschamps Date: Thu, 25 Aug 2022 19:56:06 +0200 Subject: [PATCH] Tentative fix for random crash forwarding a message --- Classes/ChatConversationView.m | 2 +- Classes/LinphoneUI/UIChatBubbleTextCell.m | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Classes/ChatConversationView.m b/Classes/ChatConversationView.m index 46bde52c5..484d525bc 100644 --- a/Classes/ChatConversationView.m +++ b/Classes/ChatConversationView.m @@ -2207,7 +2207,7 @@ void on_shared_player_eof_reached(LinphonePlayer *p) { onCancelClick:^() {} onConfirmationClick:^() { linphone_chat_message_send(linphone_chat_room_create_forward_message(_chatRoom, message)); - + linphone_chat_message_unref(message); }]; d.forwardImage.hidden = NO; [d setSpecialColor]; diff --git a/Classes/LinphoneUI/UIChatBubbleTextCell.m b/Classes/LinphoneUI/UIChatBubbleTextCell.m index 7da5f39eb..c248b0507 100644 --- a/Classes/LinphoneUI/UIChatBubbleTextCell.m +++ b/Classes/LinphoneUI/UIChatBubbleTextCell.m @@ -883,7 +883,7 @@ static const CGFloat REPLY_OR_FORWARD_TAG_HEIGHT = 18; [_messageActionsIcons addObject:@"menu_forward_default"]; [_messageActionsBlocks addObject:^{ [thiz dismissPopup]; - VIEW(ChatConversationView).pendingForwardMessage = message; + VIEW(ChatConversationView).pendingForwardMessage = linphone_chat_message_ref(message); [PhoneMainView.instance changeCurrentView:VIEW(ChatsListView).compositeViewDescription]; }];