diff --git a/Linphone/core/account/AccountDeviceList.cpp b/Linphone/core/account/AccountDeviceList.cpp index 6b72a5e11..b128287e4 100644 --- a/Linphone/core/account/AccountDeviceList.cpp +++ b/Linphone/core/account/AccountDeviceList.cpp @@ -81,8 +81,14 @@ void AccountDeviceList::refreshDevices() { auto requestDeviceList = [this] { if (!mAccountManagerServicesModelConnection) return; mAccountManagerServicesModelConnection->invokeToModel([this]() { - auto identityAddress = mAccountCore->getModel()->getMonitor()->getParams()->getIdentityAddress(); - auto authinfo = mAccountCore->getModel()->getMonitor()->findAuthInfo(); + auto account = mAccountCore->getModel()->getMonitor(); + auto identityAddress = account->getParams()->getIdentityAddress(); + auto authinfo = account->findAuthInfo(); + if (!authinfo) { + lWarning() << "[AccountDeviceList] No auth info found for address" + << identityAddress->asStringUriOnly() << ", skipping device list request"; + return; + } qDebug() << "[AccountDeviceList] request devices for address" << identityAddress->asStringUriOnly(); mAccountManagerServicesModel->getDeviceList(identityAddress); });