diff options
| author | Thanos Doukoudakis <thanos.doukoudakis@isode.com> | 2018-02-14 18:00:51 (GMT) |
|---|---|---|
| committer | Thanos Doukoudakis <thanos.doukoudakis@isode.com> | 2018-02-14 18:02:16 (GMT) |
| commit | 9f63c4a1456e154e6b48de2f9a8fa5105c8c020b (patch) | |
| tree | 4f3fa39370bec74aec729e709bf6332bfc0bdb45 /Swift/Controllers/Chat/ChatControllerBase.cpp | |
| parent | 1b99be2dc6470f13fba252264e82a3571768d199 (diff) | |
| download | swift-9f63c4a1456e154e6b48de2f9a8fa5105c8c020b.zip swift-9f63c4a1456e154e6b48de2f9a8fa5105c8c020b.tar.bz2 | |
Fix a crash that occurs when inviting users in a chat
After inviting people to a chat, and converting to a MUC room, some of the
chat window signals were still signaling the original chat controller,
that has been destroying, causing a crash.
Test-Information:
Tested the changes in Windows 10 (64 bit), after triggering the
dayChangeTimer, and onContinuationsBroken signal that was causing the
crash.
Change-Id: I70a80ab2653ed87a1dbea851157d95fb5918913f
Diffstat (limited to 'Swift/Controllers/Chat/ChatControllerBase.cpp')
| -rw-r--r-- | Swift/Controllers/Chat/ChatControllerBase.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Swift/Controllers/Chat/ChatControllerBase.cpp b/Swift/Controllers/Chat/ChatControllerBase.cpp index 0fc735a..19bbf8d 100644 --- a/Swift/Controllers/Chat/ChatControllerBase.cpp +++ b/Swift/Controllers/Chat/ChatControllerBase.cpp | |||
| @@ -58,6 +58,9 @@ void ChatControllerBase::handleContinuationsBroken() { | |||
| 58 | } | 58 | } |
| 59 | 59 | ||
| 60 | ChatWindow* ChatControllerBase::detachChatWindow() { | 60 | ChatWindow* ChatControllerBase::detachChatWindow() { |
| 61 | chatWindow_->onContinuationsBroken.disconnect(boost::bind(&ChatControllerBase::handleContinuationsBroken, this)); | ||
| 62 | chatWindow_->onSendMessageRequest.disconnect(boost::bind(&ChatControllerBase::handleSendMessageRequest, this, _1, _2)); | ||
| 63 | chatWindow_->onAllMessagesRead.disconnect(boost::bind(&ChatControllerBase::handleAllMessagesRead, this)); | ||
| 61 | ChatWindow* chatWindow = chatWindow_; | 64 | ChatWindow* chatWindow = chatWindow_; |
| 62 | chatWindow_ = nullptr; | 65 | chatWindow_ = nullptr; |
| 63 | return chatWindow; | 66 | return chatWindow; |
Swift