mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-29 00:27:27 -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
1 changed files with 9 additions and 8 deletions
|
@ -656,16 +656,17 @@ void p3GxsCircles::notifyChanges(std::vector<RsGxsNotify *> &changes)
|
||||||
|
|
||||||
RsGxsCircleGroupItem *new_circle_grp_item = dynamic_cast<RsGxsCircleGroupItem*>(groupChange->mNewGroupItem);
|
RsGxsCircleGroupItem *new_circle_grp_item = dynamic_cast<RsGxsCircleGroupItem*>(groupChange->mNewGroupItem);
|
||||||
|
|
||||||
for(auto& gxs_id: new_circle_grp_item->gxsIdSet.ids)
|
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>();
|
{
|
||||||
|
auto ev = std::make_shared<RsGxsCircleEvent>();
|
||||||
|
|
||||||
ev->mCircleEventType = RsGxsCircleEventCode::CIRCLE_MEMBERSHIP_ID_ADDED_TO_INVITEE_LIST;
|
ev->mCircleEventType = RsGxsCircleEventCode::CIRCLE_MEMBERSHIP_ID_ADDED_TO_INVITEE_LIST;
|
||||||
ev->mCircleId = RsGxsCircleId(*git);
|
ev->mCircleId = RsGxsCircleId(*git);
|
||||||
ev->mGxsId = gxs_id;
|
ev->mGxsId = gxs_id;
|
||||||
|
|
||||||
rsEvents->sendEvent(ev);
|
rsEvents->sendEvent(ev);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(c->getType()==RsGxsNotify::TYPE_UPDATED)
|
else if(c->getType()==RsGxsNotify::TYPE_UPDATED)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue