mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-29 02:51:45 -04:00
GXS:
- fixed some possible crashs with dynamic_cast - fixed memory leak in p3GxsCircles::cache_load_for_token and p3Posted::background_loadMsgs git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6532 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
fef4a87c7c
commit
c3303a1969
3 changed files with 55 additions and 38 deletions
|
@ -840,6 +840,12 @@ bool p3GxsCircles::cache_load_for_token(uint32_t token)
|
|||
for(; vit != grpData.end(); vit++)
|
||||
{
|
||||
RsGxsCircleGroupItem *item = dynamic_cast<RsGxsCircleGroupItem*>(*vit);
|
||||
if (!item)
|
||||
{
|
||||
std::cerr << "Not a RsGxsCircleGroupItem Item, deleting!" << std::endl;
|
||||
delete(*vit);
|
||||
continue;
|
||||
}
|
||||
RsGxsCircleGroup group;
|
||||
item->convertTo(group);
|
||||
|
||||
|
@ -861,6 +867,7 @@ bool p3GxsCircles::cache_load_for_token(uint32_t token)
|
|||
std::cerr << "p3GxsCircles::cache_load_for_token() Load ERROR: ";
|
||||
std::cerr << item->meta;
|
||||
std::cerr << std::endl;
|
||||
delete(item);
|
||||
// ERROR.
|
||||
continue;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue