From b4c14a9769796872f89541ce1fcb383523f2f380 Mon Sep 17 00:00:00 2001 From: "Alexander \"PapaTutuWawa" Date: Thu, 15 Sep 2022 23:33:07 +0200 Subject: [PATCH] fix: Guard against a crash in the critical section --- lib/src/omemo/sessionmanager.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/omemo/sessionmanager.dart b/lib/src/omemo/sessionmanager.dart index 3e924e1..ce10a7d 100644 --- a/lib/src/omemo/sessionmanager.dart +++ b/lib/src/omemo/sessionmanager.dart @@ -415,7 +415,7 @@ class OmemoSessionManager { await _lock.synchronized(() async { // Get devices for jid - final devices = _deviceMap[jid]!; + final devices = _deviceMap[jid] ?? []; for (final deviceId in devices) { final ratchet = _ratchetMap[RatchetMapKey(jid, deviceId)]!;