mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-02-01 03:19:23 +00:00
Fix crash on finding accounts
This commit is contained in:
parent
60ffa4816c
commit
19b8f0c63f
1 changed files with 4 additions and 1 deletions
|
|
@ -87,10 +87,13 @@ shared_ptr<linphone::Address> AccountSettingsModel::getUsedSipAddress () const {
|
|||
}
|
||||
|
||||
std::shared_ptr<linphone::Account> AccountSettingsModel::findAccount(shared_ptr<const linphone::Address> address) const {
|
||||
if(!address)
|
||||
return nullptr;
|
||||
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))
|
||||
auto contactAddress = account->getContactAddress();
|
||||
if(contactAddress && contactAddress->weakEqual(address))
|
||||
return account;
|
||||
}
|
||||
return nullptr;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue