summary refs log tree commit diff
path: root/src/Olm.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Olm.cpp')
-rw-r--r--src/Olm.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Olm.cpp b/src/Olm.cpp

index 60460b5c..14c97984 100644 --- a/src/Olm.cpp +++ b/src/Olm.cpp
@@ -1129,6 +1129,10 @@ decryptEvent(const MegolmSessionIndex &index, std::string msg_str; try { auto session = cache::client()->getInboundMegolmSession(index); + if (!session) { + return {DecryptionErrorCode::MissingSession, std::nullopt, std::nullopt}; + } + auto sessionData = cache::client()->getMegolmSessionData(index).value_or(GroupSessionData{});