mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -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
@ -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
|
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();
|
return QModelIndex();
|
||||||
|
|
||||||
if(parent.internalId() == 0)
|
if(parent.internalId() == 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user