Fix crash logging out from an account with no contact address

This commit is contained in:
Christophe Deschamps 2025-02-03 10:57:29 +01:00
parent 4defd26bb6
commit ac8e0f146c

View file

@ -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<linphone::Account> AccountModel::getAccount() const {