mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-02-10 03:49:51 -05:00
fixed bug in accessing null pointer
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7236 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
3a18136678
commit
e3c6816713
@ -307,6 +307,8 @@ RsGxsGrpMetaData* RsDataService::locked_getGrpMeta(RetroCursor &c)
|
|||||||
|
|
||||||
if(data)
|
if(data)
|
||||||
ok &= grpMeta->keys.GetTlv(data, data_len, &offset);
|
ok &= grpMeta->keys.GetTlv(data, data_len, &offset);
|
||||||
|
else
|
||||||
|
grpMeta->keys.TlvClear() ;
|
||||||
|
|
||||||
// local meta
|
// local meta
|
||||||
grpMeta->mSubscribeFlags = c.getInt32(COL_GRP_SUBCR_FLAG);
|
grpMeta->mSubscribeFlags = c.getInt32(COL_GRP_SUBCR_FLAG);
|
||||||
|
@ -1899,7 +1899,7 @@ void RsGenExchange::processGroupUpdatePublish()
|
|||||||
std::map<RsGxsGroupId, RsGxsGrpMetaData*>::iterator mit = grpMeta.find(groupId);
|
std::map<RsGxsGroupId, RsGxsGrpMetaData*>::iterator mit = grpMeta.find(groupId);
|
||||||
|
|
||||||
RsGxsGrpMetaData* meta = NULL;
|
RsGxsGrpMetaData* meta = NULL;
|
||||||
if(mit == grpMeta.end())
|
if(mit == grpMeta.end() || mit->second == NULL)
|
||||||
{
|
{
|
||||||
std::cerr << "Error! could not find meta of old group to update!" << std::endl;
|
std::cerr << "Error! could not find meta of old group to update!" << std::endl;
|
||||||
mDataAccess->updatePublicRequestStatus(gup.mToken, RsTokenService::GXS_REQUEST_V2_STATUS_FAILED);
|
mDataAccess->updatePublicRequestStatus(gup.mToken, RsTokenService::GXS_REQUEST_V2_STATUS_FAILED);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user