diff --git a/linphone-desktop/src/components/chat/ChatModel.cpp b/linphone-desktop/src/components/chat/ChatModel.cpp index 62e6e5f52..19beb1e19 100644 --- a/linphone-desktop/src/components/chat/ChatModel.cpp +++ b/linphone-desktop/src/components/chat/ChatModel.cpp @@ -567,7 +567,10 @@ void ChatModel::resetMessagesCount () { // ----------------------------------------------------------------------------- void ChatModel::handleCallStateChanged (const shared_ptr &call, linphone::CallState state) { - if (mChatRoom == call->getChatRoom() && (state == linphone::CallStateEnd || state == linphone::CallStateError)) + if ( + (state == linphone::CallStateEnd || state == linphone::CallStateError) && + mChatRoom == CoreManager::getInstance()->getCore()->getChatRoom(call->getRemoteAddress()) + ) insertCall(call->getCallLog()); }