fix crash when no account and try to add chat

This commit is contained in:
Gaelle Braud 2026-03-11 10:12:16 +01:00
parent c4d275c5b3
commit 6d957a2884

View file

@ -158,6 +158,7 @@ void ChatList::setSelf(QSharedPointer<ChatList> me) {
const std::shared_ptr<linphone::ChatMessage> &message, bool sendAddSignal = false) {
mustBeInLinphoneThread(log().arg(Q_FUNC_INFO));
// if (!message) return;
if (!core->getDefaultAccount()) return;
if (room->getAccount() != core->getDefaultAccount()) {
qInfo() << log().arg("Chat room to add does not refer to current account, return");
return;