fix: Guard against a crash in the critical section
This commit is contained in:
parent
b69acdd936
commit
b4c14a9769
@ -415,7 +415,7 @@ class OmemoSessionManager {
|
|||||||
|
|
||||||
await _lock.synchronized(() async {
|
await _lock.synchronized(() async {
|
||||||
// Get devices for jid
|
// Get devices for jid
|
||||||
final devices = _deviceMap[jid]!;
|
final devices = _deviceMap[jid] ?? [];
|
||||||
|
|
||||||
for (final deviceId in devices) {
|
for (final deviceId in devices) {
|
||||||
final ratchet = _ratchetMap[RatchetMapKey(jid, deviceId)]!;
|
final ratchet = _ratchetMap[RatchetMapKey(jid, deviceId)]!;
|
||||||
|
Loading…
Reference in New Issue
Block a user