[network/ruqola] src/widgets/misc: Make sure that account is not null before connecting
Laurent Montel <[email protected]>
| Newsgroups | gmane.comp.kde.cvs |
|---|---|
| Message-ID | <[email protected]> |
Git commit 77f16510898ff771dfad39663cdb51abb59cbbd2 by Laurent Montel.
Committed on 13/08/2026 at 20:34.
Pushed by mlaurent into branch 'master'.
Make sure that account is not null before connecting
M +3 -1 src/widgets/misc/avatarcachemanager.cpp
https://invent.kde.org/network/ruqola/-/commit/77f16510898ff771dfad39663cdb51abb59cbbd2
diff --git a/src/widgets/misc/avatarcachemanager.cpp b/src/widgets/misc/avatarcachemanager.cpp
index e9e6e49c32..943db4edda 100644
--- a/src/widgets/misc/avatarcachemanager.cpp
+++ b/src/widgets/misc/avatarcachemanager.cpp
@@ -54,7 +54,9 @@ void AvatarCacheManager::setCurrentRocketChatAccount(RocketChatAccount *currentR
}
mRocketChatAccount = currentRocketChatAccount;
- connect(mRocketChatAccount, &RocketChatAccount::avatarWasChanged, this, &AvatarCacheManager::slotAvatarChanged);
+ if (mRocketChatAccount) {
+ connect(mRocketChatAccount, &RocketChatAccount::avatarWasChanged, this, &AvatarCacheManager::slotAvatarChanged);
+ }
}
QPixmap AvatarCacheManager::makeAvatarEmojiPixmap(const QString &emojiStr, const QWidget *widget, const Utils::AvatarInfo &info, int maxHeight) const