Fix crash on new participants when account have no contact address.

This commit is contained in:
Julien Wadel 2023-07-27 18:41:14 +02:00
parent bbae9ecb4c
commit 34a73deca5

View file

@ -90,7 +90,7 @@ shared_ptr<const linphone::Address> AccountSettingsModel::getUsedSipAddress () c
shared_ptr<linphone::Core> core = CoreManager::getInstance()->getCore();
list<shared_ptr<linphone::Account>> accounts = CoreManager::getInstance()->getAccountList();
for(auto account : accounts){
if(account->getContactAddress()->weakEqual(address))
if(account && account->getContactAddress() && account->getContactAddress()->weakEqual(address))
return account;
}
return nullptr;