mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-30 01:39:20 +00:00
manage null case
This commit is contained in:
parent
81ff3c8813
commit
7bcfe62274
1 changed files with 3 additions and 0 deletions
|
|
@ -219,6 +219,9 @@ bctbx_list_t *linphone_chat_room_get_history_range_events (LinphoneChatRoom *cr,
|
|||
|
||||
LinphoneChatMessage *linphone_chat_room_get_last_message_in_history(LinphoneChatRoom *cr) {
|
||||
shared_ptr<LinphonePrivate::ChatMessage> cppPtr = L_GET_CPP_PTR_FROM_C_OBJECT(cr)->getLastMessageInHistory();
|
||||
if (!cppPtr)
|
||||
return nullptr;
|
||||
|
||||
LinphoneChatMessage *object = L_INIT(ChatMessage);
|
||||
L_SET_CPP_PTR_FROM_C_OBJECT(object, cppPtr);
|
||||
return object;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue