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
d2c788a0
Commit
d2c788a0
authored
Oct 02, 2017
by
Sylvain Berfini
🎩
Browse files
Fixed crash due to bad weak_ptr in ChatRoom
parent
655ce511
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
src/chat/chat-room.cpp
src/chat/chat-room.cpp
+6
-3
No files found.
src/chat/chat-room.cpp
View file @
d2c788a0
...
...
@@ -88,9 +88,12 @@ void ChatRoomPrivate::release () {
isComposingHandler
.
stopTimers
();
for
(
auto
&
message
:
weakMessages
)
{
shared_ptr
<
ChatMessage
>
msg
(
message
);
msg
->
cancelFileTransfer
();
msg
->
getPrivate
()
->
setChatRoom
(
nullptr
);
try
{
shared_ptr
<
ChatMessage
>
msg
(
message
);
msg
->
cancelFileTransfer
();
msg
->
getPrivate
()
->
setChatRoom
(
nullptr
);
}
catch
(
const
std
::
bad_weak_ptr
&
e
)
{}
}
for
(
auto
&
message
:
transientMessages
)
{
message
->
cancelFileTransfer
();
...
...
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