mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
attempt to fix crash in revoke ids from circle
This commit is contained in:
parent
cb1fe154f3
commit
2bfaadce0b
@ -941,13 +941,25 @@ void IdDialog::revokeCircleMembership()
|
|||||||
if(!getItemCircleId(ui->treeWidget_membership->currentItem(),circle_id))
|
if(!getItemCircleId(ui->treeWidget_membership->currentItem(),circle_id))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if(circle_id.isNull())
|
||||||
|
{
|
||||||
|
RsErr() << __PRETTY_FUNCTION__ << " : got a null circle ID. Cannot revoke an identity from that circle!" << std::endl;
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
|
||||||
RsGxsId gxs_id_to_revoke(qobject_cast<QAction*>(sender())->data().toString().toStdString());
|
RsGxsId gxs_id_to_revoke(qobject_cast<QAction*>(sender())->data().toString().toStdString());
|
||||||
|
|
||||||
|
if(gxs_id_to_revoke.isNull())
|
||||||
|
RsErr() << __PRETTY_FUNCTION__ << " : got a null ID. Cannot revoke it from circle " << circle_id << "!" << std::endl;
|
||||||
|
else
|
||||||
RsThread::async([circle_id,gxs_id_to_revoke]()
|
RsThread::async([circle_id,gxs_id_to_revoke]()
|
||||||
{
|
{
|
||||||
// 1 - get message data from p3GxsForums
|
// 1 - get message data from p3GxsForums
|
||||||
|
|
||||||
rsGxsCircles->revokeIdsFromCircle(std::set<RsGxsId>( { gxs_id_to_revoke } ),circle_id);
|
std::set<RsGxsId> ids;
|
||||||
|
ids.insert(gxs_id_to_revoke);
|
||||||
|
|
||||||
|
rsGxsCircles->revokeIdsFromCircle(ids,circle_id);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user