Fixed crash after last commit in p3idservice.cc.

Fixed memory leaks and possible crashs in ::getGroupData
- p3gxschannels
- p3gxscircles
- p3gxsforums
- p3idservice
- p3posted
- p3photoservice


git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6524 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2013-07-21 01:50:13 +00:00
parent 3730645808
commit f5218cdfc3
7 changed files with 143 additions and 109 deletions

View file

@ -370,11 +370,20 @@ bool p3GxsCircles::getGroupData(const uint32_t &token, std::vector<RsGxsCircleGr
for(; vit != grpData.end(); vit++)
{
RsGxsCircleGroupItem* item = dynamic_cast<RsGxsCircleGroupItem*>(*vit);
RsGxsCircleGroup group;
item->convertTo(group);
if (item)
{
RsGxsCircleGroup group;
item->convertTo(group);
// If its cached - add that info (TODO).
groups.push_back(group);
// If its cached - add that info (TODO).
groups.push_back(group);
delete(item);
}
else
{
std::cerr << "Not a RsGxsCircleGroupItem, deleting!" << std::endl;
delete *vit;
}
}
}