mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-23 13:04:23 +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:
parent
4a1ed9ff0e
commit
66aeafdc63
@ -94,6 +94,8 @@ void ArticleListWidget::handleArticleAdded(RSS::Article *rssArticle)
|
|||||||
void ArticleListWidget::handleArticleRead(RSS::Article *rssArticle)
|
void ArticleListWidget::handleArticleRead(RSS::Article *rssArticle)
|
||||||
{
|
{
|
||||||
auto item = mapRSSArticle(rssArticle);
|
auto item = mapRSSArticle(rssArticle);
|
||||||
|
if (!item) return;
|
||||||
|
|
||||||
item->setData(Qt::ForegroundRole, QPalette().color(QPalette::Inactive, QPalette::WindowText));
|
item->setData(Qt::ForegroundRole, QPalette().color(QPalette::Inactive, QPalette::WindowText));
|
||||||
item->setData(Qt::DecorationRole, QIcon(":/icons/sphere.png"));
|
item->setData(Qt::DecorationRole, QIcon(":/icons/sphere.png"));
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user