Browse Source

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.
adaptive-webui-19844
Vladimir Golovnev (Glassez) 8 years ago committed by Vladimir Golovnev
parent
commit
66aeafdc63
  1. 2
      src/gui/rss/articlelistwidget.cpp

2
src/gui/rss/articlelistwidget.cpp

@ -94,6 +94,8 @@ void ArticleListWidget::handleArticleAdded(RSS::Article *rssArticle) @@ -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"));

Loading…
Cancel
Save