mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-02-07 06:09:39 +00:00
Fixed crash due to bad weak_ptr in ChatRoom
This commit is contained in:
parent
655ce51148
commit
d2c788a0c7
1 changed files with 6 additions and 3 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue