Fix bad message_ref placement, which lead to crashes

This commit is contained in:
Guillaume BIENKOWSKI 2014-09-22 14:09:26 +02:00
parent 26dd53e9fb
commit e9d76cfd41
2 changed files with 2 additions and 2 deletions

View file

@ -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];

View file

@ -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;
}