Commit 12c06a03 authored by nicolas's avatar nicolas
Browse files

fix(CoreManager): avoid memory leak on ChatModel and use correct sip address key*

parent 922723fd
......@@ -98,10 +98,11 @@ shared_ptr<ChatModel> CoreManager::getChatModelFromSipAddress (const QString &si
auto deleter = [this](ChatModel *chatModel) {
delete chatModel;
shared_ptr<ChatModel> chatModel(new ChatModel(sipAddress), deleter);
mChatModels[sipAddress] = chatModel;
mChatModels[chatModel->getSipAddress()] = chatModel;
emit chatModelCreated(chatModel);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment