diff --git a/Classes/ChatRoomTableViewController.m b/Classes/ChatRoomTableViewController.m index 323c6943a..e1995274b 100644 --- a/Classes/ChatRoomTableViewController.m +++ b/Classes/ChatRoomTableViewController.m @@ -73,7 +73,7 @@ - (void)addChatEntry:(LinphoneChatMessage*)chat { - messageList = ms_list_append(messageList, chat); + messageList = ms_list_append(messageList, linphone_chat_message_ref(chat)); int pos = ms_list_size(messageList) - 1; [self.tableView beginUpdates]; diff --git a/Classes/ChatRoomViewController.m b/Classes/ChatRoomViewController.m index cdfc82e09..c51b94ca7 100644 --- a/Classes/ChatRoomViewController.m +++ b/Classes/ChatRoomViewController.m @@ -333,7 +333,7 @@ static void message_status(LinphoneChatMessage* msg,LinphoneChatMessageState sta [LinphoneManager setValueInMessageAppData:[internalUrl absoluteString] forKey:@"localimage" inMessage:msg]; } - [tableController addChatEntry:linphone_chat_message_ref(msg)]; + [tableController addChatEntry:msg]; [tableController scrollToBottom:true]; return TRUE; }