From 66aeafdc63dbeaa777645985866c9c1b68e86341 Mon Sep 17 00:00:00 2001 From: "Vladimir Golovnev (Glassez)" Date: Wed, 7 Jun 2017 13:56:46 +0300 Subject: [PATCH] Fix crash in ArticleListWidget ArticleListWidget::handleArticleList() can be called inside ArticleListWidget::handleArticleAboutToBeRemoved() and list widget item can be removed at this point. Now we checking for it existence. Closes #6896. --- src/gui/rss/articlelistwidget.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gui/rss/articlelistwidget.cpp b/src/gui/rss/articlelistwidget.cpp index fe6fa05fd..cef67b943 100644 --- a/src/gui/rss/articlelistwidget.cpp +++ b/src/gui/rss/articlelistwidget.cpp @@ -94,6 +94,8 @@ void ArticleListWidget::handleArticleAdded(RSS::Article *rssArticle) void ArticleListWidget::handleArticleRead(RSS::Article *rssArticle) { auto item = mapRSSArticle(rssArticle); + if (!item) return; + item->setData(Qt::ForegroundRole, QPalette().color(QPalette::Inactive, QPalette::WindowText)); item->setData(Qt::DecorationRole, QIcon(":/icons/sphere.png"));