From 04e79a63eab1a47889ed6d0b0e81ded88f0ffd62 Mon Sep 17 00:00:00 2001 From: Christophe Deschamps Date: Tue, 24 Mar 2026 08:42:41 +0100 Subject: [PATCH] Check authInfo before doing getDeviceList request --- Linphone/core/account/AccountDeviceList.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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); });