From ac8e0f146cf2ae419f8e11a0430d6148db328d68 Mon Sep 17 00:00:00 2001 From: Christophe Deschamps Date: Mon, 3 Feb 2025 10:57:29 +0100 Subject: [PATCH] Fix crash logging out from an account with no contact address --- Linphone/model/account/AccountModel.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Linphone/model/account/AccountModel.cpp b/Linphone/model/account/AccountModel.cpp index f92d5655..3321257a 100644 --- a/Linphone/model/account/AccountModel.cpp +++ b/Linphone/model/account/AccountModel.cpp @@ -124,8 +124,9 @@ void AccountModel::removeAccount() { auto params = mMonitor ? mMonitor->getParams() : nullptr; qDebug() << log() .arg("Removing account [%1]") - .arg(params ? Utils::coreStringToAppString(params->getIdentityAddress()->asString()) : "Null"); - if (mMonitor) core->removeAccount(mMonitor); + .arg(params && params->getIdentityAddress() + ? Utils::coreStringToAppString(params->getIdentityAddress()->asString()) + : "Null"); } std::shared_ptr AccountModel::getAccount() const {