mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-19 21:03:30 -07:00
Initialize pointer to a default value
This commit is contained in:
parent
6de72ecc77
commit
02d906d3ae
77 changed files with 178 additions and 202 deletions
|
@ -438,7 +438,7 @@ QModelIndex TorrentContentModel::index(int row, int column, const QModelIndex &p
|
|||
if (column >= TorrentContentModelItem::NB_COL)
|
||||
return {};
|
||||
|
||||
TorrentContentModelFolder *parentItem;
|
||||
TorrentContentModelFolder *parentItem = nullptr;
|
||||
if (!parent.isValid())
|
||||
parentItem = m_rootItem;
|
||||
else
|
||||
|
@ -475,7 +475,7 @@ int TorrentContentModel::rowCount(const QModelIndex &parent) const
|
|||
if (parent.column() > 0)
|
||||
return 0;
|
||||
|
||||
TorrentContentModelFolder *parentItem;
|
||||
TorrentContentModelFolder *parentItem = nullptr;
|
||||
if (!parent.isValid())
|
||||
parentItem = m_rootItem;
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue