mirror of
https://github.com/nextcloud/desktop.git
synced 2025-10-26 11:17:43 +00:00
Ensure account pointer is valid when fetching avatars
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
parent
3957a305c2
commit
aa60f44251
@ -1650,8 +1650,9 @@ public:
|
||||
const auto accountString = userIds.last();
|
||||
const auto accountState = AccountManager::instance()->account(accountString);
|
||||
Q_ASSERT(accountState);
|
||||
if (!accountState) {
|
||||
qCWarning(lcActivity) << "Account not found:" << accountString;
|
||||
Q_ASSERT(accountState->account());
|
||||
if (!accountState || !accountState->account()) {
|
||||
qCWarning(lcActivity) << "Invalid account:" << accountString;
|
||||
return;
|
||||
}
|
||||
const auto avatarSize = requestedSize.width() > 0 ? requestedSize.width() : 64;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user