mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-05-07 14:44:01 +00:00
Verify the event is chat before accessing the model
This commit is contained in:
parent
9cd136938b
commit
1666d7b897
1 changed files with 2 additions and 1 deletions
|
|
@ -191,7 +191,8 @@ void ChatCore::setSelf(QSharedPointer<ChatCore> me) {
|
|||
});
|
||||
|
||||
mChatModelConnection->makeConnectToCore(&ChatCore::lUpdateLastMessage, [this]() {
|
||||
auto lastMessageModel = mLastEvent ? mLastEvent->getChatMessageCore()->getModel() : nullptr;
|
||||
auto lastMessageModel =
|
||||
mLastEvent && mLastEvent->getChatMessageCore() ? mLastEvent->getChatMessageCore()->getModel() : nullptr;
|
||||
mChatModelConnection->invokeToModel([this, lastMessageModel]() {
|
||||
auto linphoneMessage = mChatModel->getLastChatMessage();
|
||||
if (!lastMessageModel || lastMessageModel->getMonitor() != linphoneMessage) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue