mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-02-01 10:49:26 +00:00
Fix assert when inserting a chat room in DB.
This commit is contained in:
parent
25d8ff142d
commit
1b5e00e705
1 changed files with 7 additions and 3 deletions
|
|
@ -106,9 +106,13 @@ shared_ptr<AbstractChatRoom> CorePrivate::createClientGroupChatRoom (const strin
|
|||
|
||||
void CorePrivate::insertChatRoom (const shared_ptr<AbstractChatRoom> &chatRoom) {
|
||||
L_ASSERT(chatRoom);
|
||||
L_ASSERT(!chatRoomsById[chatRoom->getChatRoomId()]);
|
||||
chatRooms.push_back(chatRoom);
|
||||
chatRoomsById[chatRoom->getChatRoomId()] = chatRoom;
|
||||
L_ASSERT(!chatRoomsById[chatRoom->getChatRoomId()]
|
||||
|| (chatRoomsById[chatRoom->getChatRoomId()] == chatRoom)
|
||||
);
|
||||
if (!chatRoomsById[chatRoom->getChatRoomId()]) {
|
||||
chatRooms.push_back(chatRoom);
|
||||
chatRoomsById[chatRoom->getChatRoomId()] = chatRoom;
|
||||
}
|
||||
}
|
||||
|
||||
void CorePrivate::insertChatRoomWithDb (const shared_ptr<AbstractChatRoom> &chatRoom) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue