1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-01-23 04:54:18 +00:00

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.
This commit is contained in:
Vladimir Golovnev (Glassez) 2017-06-07 13:56:46 +03:00 committed by Vladimir Golovnev
parent 4a1ed9ff0e
commit 66aeafdc63

View File

@ -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"));