Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
liblinphone
Commits
902d6c1d
Commit
902d6c1d
authored
Sep 15, 2017
by
Ghislain MARY
Browse files
Fix crash in chat room destruction.
parent
d7dbb9b9
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/chat/chat-room.cpp
View file @
902d6c1d
...
...
@@ -41,18 +41,9 @@ ChatRoomPrivate::ChatRoomPrivate (LinphoneCore *core)
:
core
(
core
),
isComposingHandler
(
core
,
this
)
{}
ChatRoomPrivate
::~
ChatRoomPrivate
()
{
L_Q
(
ChatRoom
);
for
(
auto
it
=
transientMessages
.
begin
();
it
!=
transientMessages
.
end
();
it
++
)
{
linphone_chat_message_release
(
*
it
);
}
if
(
core
)
{
if
(
bctbx_list_find
(
core
->
chatrooms
,
GET_BACK_PTR
(
q
)))
{
lError
()
<<
"LinphoneChatRoom["
<<
GET_BACK_PTR
(
q
)
<<
"] is destroyed while still being used by the LinphoneCore. "
<<
"This is abnormal. linphone_core_get_chat_room() doesn't give a reference, there is no need to call linphone_chat_room_unref(). "
<<
"In order to remove a chat room from the core, use linphone_core_delete_chat_room()."
;
core
->
chatrooms
=
bctbx_list_remove
(
core
->
chatrooms
,
GET_BACK_PTR
(
q
));
}
}
if
(
pendingMessage
)
linphone_chat_message_destroy
(
pendingMessage
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment