diff --git a/src/gui/rss/feedlistwidget.cpp b/src/gui/rss/feedlistwidget.cpp index bf67f3c88..b4a2b5650 100644 --- a/src/gui/rss/feedlistwidget.cpp +++ b/src/gui/rss/feedlistwidget.cpp @@ -164,6 +164,8 @@ QList FeedListWidget::getAllOpenedFolders(QTreeWidgetItem *pa RSS::Item *FeedListWidget::getRSSItem(QTreeWidgetItem *item) const { + if (!item) return nullptr; + return reinterpret_cast(item->data(0, Qt::UserRole).value()); } diff --git a/src/gui/rss/rsswidget.cpp b/src/gui/rss/rsswidget.cpp index 59d204f47..d2524bc87 100644 --- a/src/gui/rss/rsswidget.cpp +++ b/src/gui/rss/rsswidget.cpp @@ -416,11 +416,6 @@ void RSSWidget::copySelectedFeedsURL() void RSSWidget::handleCurrentFeedItemChanged(QTreeWidgetItem *currentItem) { - if (!currentItem) { - m_articleListWidget->clear(); - return; - } - m_articleListWidget->setRSSItem(m_feedListWidget->getRSSItem(currentItem) , (currentItem == m_feedListWidget->stickyUnreadItem())); }