mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 11:00:48 +03:00
Fix crash, when keys for no events were requested
This commit is contained in:
parent
5fbf17f6ec
commit
50564985cc
1 changed files with 2 additions and 1 deletions
|
@ -246,7 +246,8 @@ EventStore::receivedSessionKey(const std::string &session_id)
|
|||
// Don't request keys again until Nheko is restarted (for now)
|
||||
pending_key_requests[session_id].events.clear();
|
||||
|
||||
olm::send_key_request_for(request.events.front(), request.request_id, true);
|
||||
if (!request.events.empty())
|
||||
olm::send_key_request_for(request.events.front(), request.request_id, true);
|
||||
|
||||
for (const auto &e : request.events) {
|
||||
auto idx = idToIndex(e.event_id);
|
||||
|
|
Loading…
Reference in a new issue