diff --git a/libretroshare/src/gxs/rsgenexchange.cc b/libretroshare/src/gxs/rsgenexchange.cc index 97fa36f5b..f644c5a0c 100644 --- a/libretroshare/src/gxs/rsgenexchange.cc +++ b/libretroshare/src/gxs/rsgenexchange.cc @@ -2076,7 +2076,7 @@ bool RsGenExchange::processGrpMask(const RsGxsGroupId& grpId, ContentValue &grpC // first find out which mask is involved int32_t value, mask, currValue; std::string key; - RsGxsGrpMetaData* grpMeta = NULL; + const RsGxsGrpMetaData* grpMeta = NULL; bool ok = false; RsGxsGrpMetaTemporaryMap grpMetaMap; @@ -2087,7 +2087,8 @@ bool RsGenExchange::processGrpMask(const RsGxsGroupId& grpId, ContentValue &grpC if((mit = grpMetaMap.find(grpId)) != grpMetaMap.end()) { - const RsGxsGrpMetaData *grpMeta = mit->second; + grpMeta = mit->second; + if (!grpMeta) { #ifdef GEN_EXCH_DEBUG diff --git a/libretroshare/src/gxs/rsgxsrequesttypes.cc b/libretroshare/src/gxs/rsgxsrequesttypes.cc index 877569c65..81dec52ab 100644 --- a/libretroshare/src/gxs/rsgxsrequesttypes.cc +++ b/libretroshare/src/gxs/rsgxsrequesttypes.cc @@ -28,7 +28,8 @@ GroupMetaReq::~GroupMetaReq() { - rsstd::delete_all(mGroupMetaData.begin(), mGroupMetaData.end()); + //rsstd::delete_all(mGroupMetaData.begin(), mGroupMetaData.end()); // now memory ownership is kept by the cache. + mGroupMetaData.clear(); } GroupDataReq::~GroupDataReq()