From 4296470ab38413a90ad67b1c1823ac30fe5d603d Mon Sep 17 00:00:00 2001 From: Jehan Monnier Date: Wed, 6 Jun 2018 16:01:38 +0200 Subject: [PATCH] fix wrong association between c and cpp chat message pointer --- src/c-wrapper/api/c-chat-room.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/c-wrapper/api/c-chat-room.cpp b/src/c-wrapper/api/c-chat-room.cpp index 18f996048..0832910e4 100644 --- a/src/c-wrapper/api/c-chat-room.cpp +++ b/src/c-wrapper/api/c-chat-room.cpp @@ -236,9 +236,7 @@ LinphoneChatMessage *linphone_chat_room_get_last_message_in_history(LinphoneChat if (!cppPtr) return nullptr; - LinphoneChatMessage *object = L_INIT(ChatMessage); - L_SET_CPP_PTR_FROM_C_OBJECT(object, cppPtr); - return object; + return linphone_chat_message_ref(L_GET_C_BACK_PTR(cppPtr)); } LinphoneChatMessage *linphone_chat_room_find_message (LinphoneChatRoom *cr, const char *message_id) {