From abff61bb6cc69f93e9a571375489b22e72b072ab Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Sat, 3 Oct 2020 17:23:59 +0200 Subject: [PATCH] Fix nullopt when iterating reactions --- src/timeline/EventStore.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/timeline/EventStore.cpp b/src/timeline/EventStore.cpp index 298e0d1..29b3c23 100644 --- a/src/timeline/EventStore.cpp +++ b/src/timeline/EventStore.cpp @@ -390,7 +390,8 @@ EventStore::reactions(const std::string &event_id) continue; if (auto reaction = std::get_if>( - related_event)) { + related_event); + reaction && reaction->content.relates_to.key) { auto &agg = aggregation[reaction->content.relates_to.key.value()]; if (agg.count == 0) {