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) {