Fixed deadlock while removing conversations
This commit is contained in:
parent
d699f6614f
commit
83bf526fbc
2 changed files with 2 additions and 0 deletions
|
@ -32,6 +32,7 @@ Conversation::Conversation(ConversationManager *conversationManager, const std::
|
|||
m_legacyName = legacyName;
|
||||
m_conversationManager->addConversation(this);
|
||||
m_muc = isMUC;
|
||||
std::cout << "new conversation " << legacyName << "\n";
|
||||
}
|
||||
|
||||
Conversation::~Conversation() {
|
||||
|
|
|
@ -37,6 +37,7 @@ ConversationManager::ConversationManager(User *user, Component *component){
|
|||
|
||||
ConversationManager::~ConversationManager() {
|
||||
while(!m_convs.empty()) {
|
||||
m_convs.erase(m_convs.begin());
|
||||
delete (*m_convs.begin()).second;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue