mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-13 16:53:08 -07:00
Fix possible null pointer dereference
This commit is contained in:
parent
3a3125ea2b
commit
abfcfb5af0
1 changed files with 2 additions and 2 deletions
|
@ -224,7 +224,7 @@ void RSSWidget::askNewFolder()
|
||||||
destItem = destItem->parent();
|
destItem = destItem->parent();
|
||||||
}
|
}
|
||||||
// Consider the case where the user clicked on Unread item
|
// Consider the case where the user clicked on Unread item
|
||||||
RSS::Folder *rssDestFolder = ((destItem == m_feedListWidget->stickyUnreadItem())
|
RSS::Folder *rssDestFolder = ((!destItem || (destItem == m_feedListWidget->stickyUnreadItem()))
|
||||||
? RSS::Session::instance()->rootFolder()
|
? RSS::Session::instance()->rootFolder()
|
||||||
: qobject_cast<RSS::Folder *>(m_feedListWidget->getRSSItem(destItem)));
|
: qobject_cast<RSS::Folder *>(m_feedListWidget->getRSSItem(destItem)));
|
||||||
|
|
||||||
|
@ -234,7 +234,7 @@ void RSSWidget::askNewFolder()
|
||||||
QMessageBox::warning(this, "qBittorrent", error, QMessageBox::Ok);
|
QMessageBox::warning(this, "qBittorrent", error, QMessageBox::Ok);
|
||||||
|
|
||||||
// Expand destination folder to display new feed
|
// Expand destination folder to display new feed
|
||||||
if (destItem != m_feedListWidget->stickyUnreadItem())
|
if (destItem && (destItem != m_feedListWidget->stickyUnreadItem()))
|
||||||
destItem->setExpanded(true);
|
destItem->setExpanded(true);
|
||||||
// As new RSS items are added synchronously, we can do the following here.
|
// As new RSS items are added synchronously, we can do the following here.
|
||||||
m_feedListWidget->setCurrentItem(m_feedListWidget->mapRSSItem(RSS::Session::instance()->itemByPath(newFolderPath)));
|
m_feedListWidget->setCurrentItem(m_feedListWidget->mapRSSItem(RSS::Session::instance()->itemByPath(newFolderPath)));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue