Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
BC
public
liblinphone
Commits
83e8d95a
Commit
83e8d95a
authored
Oct 02, 2017
by
Sylvain Berfini
🎩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Catch another bad_weak_ptr exception
parent
c6994469
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
src/chat/chat-room.cpp
src/chat/chat-room.cpp
+5
-4
No files found.
src/chat/chat-room.cpp
View file @
83e8d95a
...
...
@@ -91,7 +91,6 @@ void ChatRoomPrivate::release () {
msg
->
cancelFileTransfer
();
msg
->
getPrivate
()
->
setChatRoom
(
nullptr
);
}
catch
(
const
std
::
bad_weak_ptr
&
e
)
{}
}
for
(
auto
&
message
:
transientMessages
)
{
message
->
cancelFileTransfer
();
...
...
@@ -336,9 +335,11 @@ shared_ptr<ChatMessage> ChatRoomPrivate::getTransientMessage (unsigned int stora
std
::
shared_ptr
<
ChatMessage
>
ChatRoomPrivate
::
getWeakMessage
(
unsigned
int
storageId
)
const
{
for
(
auto
&
message
:
weakMessages
)
{
shared_ptr
<
ChatMessage
>
msg
(
message
);
if
(
msg
->
getPrivate
()
->
getStorageId
()
==
storageId
)
return
msg
;
try
{
shared_ptr
<
ChatMessage
>
msg
(
message
);
if
(
msg
->
getPrivate
()
->
getStorageId
()
==
storageId
)
return
msg
;
}
catch
(
const
std
::
bad_weak_ptr
&
e
)
{}
}
return
nullptr
;
}
...
...
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