Merge pull request #2817 from vladpirlog/fix/friendlistmodel-index-bug

Add row count check in the RsFriendListModel::index method
This commit is contained in:
csoler 2023-12-27 20:01:48 +01:00 committed by GitHub
commit 0caf8e79db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -287,7 +287,7 @@ uint32_t RsFriendListModel::EntryIndex::parentRow(uint32_t nb_groups) const
QModelIndex RsFriendListModel::index(int row, int column, const QModelIndex& parent) const
{
if(row < 0 || column < 0 || column >= COLUMN_THREAD_NB_COLUMNS)
if(row < 0 || column < 0 || column >= columnCount(parent) || row >= rowCount(parent))
return QModelIndex();
if(parent.internalId() == 0)