diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/room.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/room.cpp b/lib/room.cpp index 4f7f7ca9..ed07868b 100644 --- a/lib/room.cpp +++ b/lib/room.cpp @@ -562,8 +562,11 @@ QList<const RoomEvent*> Room::pinnedEvents() const QStringList events = d->getCurrentState<RoomPinnedEvent>()->pinnedEvents(); QList<const RoomEvent*> pinnedEvents; QStringList::iterator i; - for (i = events.begin(); i != events.end(); ++i) - pinnedEvents.append(findInTimeline(*i)->event()); + for (i = events.begin(); i != events.end(); ++i) { + auto timelineItem = findInTimeline(*i); + if (timelineItem != historyEdge()) + pinnedEvents.append(timelineItem->event()); + } return pinnedEvents; } |