fixed possible bug due to not checking returned value

This commit is contained in:
csoler 2019-08-23 22:51:50 +02:00
parent cc32de8466
commit a9aa5225ca
No known key found for this signature in database
GPG key ID: 7BCA522266C0804C
2 changed files with 6 additions and 6 deletions

View file

@ -599,6 +599,9 @@ QVariant RsFriendListModel::displayRole(const EntryIndex& e, int col) const
{
const HierarchicalGroupInformation *group = getGroupInfo(e);
if(!group)
return QVariant();
uint32_t nb_online = 0;
for(uint32_t i=0;i<group->child_profile_indices.size();++i)
@ -609,9 +612,6 @@ QVariant RsFriendListModel::displayRole(const EntryIndex& e, int col) const
break;// only breaks the inner loop, on purpose.
}
if(!group)
return QVariant();
switch(col)
{
case COLUMN_THREAD_NAME: