Commit da0b235d authored by Ronan Abhamon's avatar Ronan Abhamon

fix(CoreManager): move assert to the right place in `getChatModelFromSipAddress`

parent 7aeba275
...@@ -77,10 +77,10 @@ shared_ptr<ChatModel> CoreManager::getChatModelFromSipAddress (const QString &si ...@@ -77,10 +77,10 @@ shared_ptr<ChatModel> CoreManager::getChatModelFromSipAddress (const QString &si
if (!sipAddress.length()) if (!sipAddress.length())
return nullptr; return nullptr;
Q_ASSERT(mCore->createAddress(::Utils::appStringToCoreString(sipAddress)) != nullptr);
// Create a new chat model. // Create a new chat model.
if (!mChatModels.contains(sipAddress)) { if (!mChatModels.contains(sipAddress)) {
Q_ASSERT(mCore->createAddress(::Utils::appStringToCoreString(sipAddress)) != nullptr);
auto deleter = [this](ChatModel *chatModel) { auto deleter = [this](ChatModel *chatModel) {
mChatModels.remove(chatModel->getSipAddress()); mChatModels.remove(chatModel->getSipAddress());
}; };
......
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