mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
added a check to prevent SEGV when sending a notification about a group we updated
This commit is contained in:
parent
df2899bae9
commit
e09bf7c261
@ -656,16 +656,17 @@ void p3GxsCircles::notifyChanges(std::vector<RsGxsNotify *> &changes)
|
||||
|
||||
RsGxsCircleGroupItem *new_circle_grp_item = dynamic_cast<RsGxsCircleGroupItem*>(groupChange->mNewGroupItem);
|
||||
|
||||
for(auto& gxs_id: new_circle_grp_item->gxsIdSet.ids)
|
||||
{
|
||||
auto ev = std::make_shared<RsGxsCircleEvent>();
|
||||
if(new_circle_grp_item) // groups published by us do not come in the mNewGroupItem field. It's possible to add them, in rsgenexchange.cc:2806
|
||||
for(auto& gxs_id: new_circle_grp_item->gxsIdSet.ids)
|
||||
{
|
||||
auto ev = std::make_shared<RsGxsCircleEvent>();
|
||||
|
||||
ev->mCircleEventType = RsGxsCircleEventCode::CIRCLE_MEMBERSHIP_ID_ADDED_TO_INVITEE_LIST;
|
||||
ev->mCircleId = RsGxsCircleId(*git);
|
||||
ev->mGxsId = gxs_id;
|
||||
ev->mCircleEventType = RsGxsCircleEventCode::CIRCLE_MEMBERSHIP_ID_ADDED_TO_INVITEE_LIST;
|
||||
ev->mCircleId = RsGxsCircleId(*git);
|
||||
ev->mGxsId = gxs_id;
|
||||
|
||||
rsEvents->sendEvent(ev);
|
||||
}
|
||||
rsEvents->sendEvent(ev);
|
||||
}
|
||||
}
|
||||
else if(c->getType()==RsGxsNotify::TYPE_UPDATED)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user