[network/ruqola] src/core/encryption: Fix potential crash
Laurent Montel <[email protected]>
| Newsgroups | gmane.comp.kde.cvs |
|---|---|
| Message-ID | <[email protected]> |
Git commit 25c58656dc9700d6b6019fb5aa7bf21e7db29db3 by Laurent Montel.
Committed on 17/08/2026 at 11:38.
Pushed by mlaurent into branch 'master'.
Fix potential crash
M +3 -0 src/core/encryption/e2ekeymanager.cpp
https://invent.kde.org/network/ruqola/-/commit/25c58656dc9700d6b6019fb5aa7bf21e7db29db3
diff --git a/src/core/encryption/e2ekeymanager.cpp b/src/core/encryption/e2ekeymanager.cpp
index 37d08cff48..781994ceb7 100644
--- a/src/core/encryption/e2ekeymanager.cpp
+++ b/src/core/encryption/e2ekeymanager.cpp
@@ -1127,6 +1127,9 @@ void E2eKeyManager::distributeKeysToWaitingUsers()
void E2eKeyManager::slotUsersWaitingForGroupKey([[maybe_unused]] const QJsonObject &replyObject)
{
#if USE_E2E_SUPPORT
+ if (!mAccount) {
+ return;
+ }
const QJsonObject usersPerRoom = replyObject.value("usersWaitingForE2EKeys"_L1).toObject();
for (auto it = usersPerRoom.constBegin(); it != usersPerRoom.constEnd(); ++it) {
const QByteArray roomId = it.key().toLatin1();