Fixed crash in chat room state changed callback if trying to find chat room

This commit is contained in:
Sylvain Berfini 2018-02-08 15:48:19 +01:00
parent 017f4790b0
commit 1c9f356e4f

View file

@ -79,8 +79,8 @@ public:
shared_ptr<AbstractChatRoom> bcr = cgcr->getCore()->onlyGetOrCreateBasicChatRoom(invitedAddresses.front());
L_SET_CPP_PTR_FROM_C_OBJECT(lcr, bcr);
bcr->getPrivate()->setState(ChatRoom::State::Instantiated);
bcr->getPrivate()->setState(ChatRoom::State::Created);
cgcr->getCore()->getPrivate()->insertChatRoom(bcr);
bcr->getPrivate()->setState(ChatRoom::State::Created);
cgcr->getCore()->getPrivate()->insertChatRoomWithDb(bcr);
return;
}