mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-29 14:18:49 +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,6 +246,7 @@ EventStore::receivedSessionKey(const std::string &session_id)
|
||||||
// Don't request keys again until Nheko is restarted (for now)
|
// Don't request keys again until Nheko is restarted (for now)
|
||||||
pending_key_requests[session_id].events.clear();
|
pending_key_requests[session_id].events.clear();
|
||||||
|
|
||||||
|
if (!request.events.empty())
|
||||||
olm::send_key_request_for(request.events.front(), request.request_id, true);
|
olm::send_key_request_for(request.events.front(), request.request_id, true);
|
||||||
|
|
||||||
for (const auto &e : request.events) {
|
for (const auto &e : request.events) {
|
||||||
|
|
Loading…
Reference in a new issue