diff --git a/Linphone/core/chat/ChatList.cpp b/Linphone/core/chat/ChatList.cpp index e497492ea..136562fe9 100644 --- a/Linphone/core/chat/ChatList.cpp +++ b/Linphone/core/chat/ChatList.cpp @@ -169,8 +169,10 @@ void ChatList::setSelf(QSharedPointer me) { bool canAdd = false; auto linphoneChatRooms = core->getDefaultAccount()->filterChatRooms(Utils::appStringToCoreString(mFilter)); for (auto it : linphoneChatRooms) { - if (it->getIdentifier() == room->getIdentifier()) canAdd = true; - break; + if (it->getIdentifier() == room->getIdentifier()) { + canAdd = true; + break; + } } if (!canAdd) { lInfo() << log().arg("Chat room to add does not match the current filter, return");