diff --git a/src/timeline/EventStore.cpp b/src/timeline/EventStore.cpp index 84b6dcd4..5cdb372a 100644 --- a/src/timeline/EventStore.cpp +++ b/src/timeline/EventStore.cpp @@ -264,7 +264,8 @@ EventStore::EventStore(std::string room_id, QObject *) auto idx = idToIndex(pending_event_id); events_by_id_.remove({room_id_, pending_event_id}); - events_.remove({room_id_, toInternalIdx(*idx)}); + if (idx) + events_.remove({room_id_, toInternalIdx(*idx)}); } }