fixed bug in calling setItemWidget on a possibly null item

This commit is contained in:
csoler 2020-03-04 22:43:17 +01:00
parent 87e92e5229
commit 48d09b5867
No known key found for this signature in database
GPG Key ID: 7BCA522266C0804C

View File

@ -1519,11 +1519,12 @@ void IdDialog::loadIdentities(const std::map<RsGxsGroupId,RsGxsIdGroup>& ids_set
contactsItem->addChild(item); contactsItem->addChild(item);
else else
allItem->addChild(item); allItem->addChild(item);
}
GxsIdLabel *label = new GxsIdLabel();
label->setId(RsGxsId(data.mMeta.mGroupId)) ;
ui->treeWidget_membership->setItemWidget(item,0,label) ; GxsIdLabel *label = new GxsIdLabel();
label->setId(RsGxsId(data.mMeta.mGroupId)) ;
ui->treeWidget_membership->setItemWidget(item,0,label) ;
}
} }
/* count items */ /* count items */