mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-01 17:46:52 -04:00
Add row count check in the RsFriendListModel::index method
Fix bug occurring after login where the app would crash unexpectedly. Turns out there was an index out of bounds exception occurring in the RsFriendListModel::index method.
This commit is contained in:
parent
081782c97c
commit
b5d40f7964
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue