From 2a841d7ab3342fca8361e9c0108a88c338d5a86f Mon Sep 17 00:00:00 2001 From: chrisparker126 Date: Wed, 18 Sep 2013 18:13:38 +0000 Subject: [PATCH] fixed mem bug git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-gxs_finale@6747 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- libretroshare/src/gxs/rsgenexchange.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/libretroshare/src/gxs/rsgenexchange.cc b/libretroshare/src/gxs/rsgenexchange.cc index d67d36c00..5b4baff0d 100644 --- a/libretroshare/src/gxs/rsgenexchange.cc +++ b/libretroshare/src/gxs/rsgenexchange.cc @@ -2388,13 +2388,19 @@ void RsGenExchange::performUpdateValidation() std::cerr << "RsGenExchange::performUpdateValidation() " << std::endl; #endif + if(mGroupUpdates.empty()) + return; + std::map grpMetas; std::vector::iterator vit = mGroupUpdates.begin(); for(; vit != mGroupUpdates.end(); vit++) grpMetas.insert(std::make_pair(vit->newGrp->grpId, (RsGxsGrpMetaData*)NULL)); - mDataStore->retrieveGxsGrpMetaData(grpMetas); + if(!grpMetas.empty()) + mDataStore->retrieveGxsGrpMetaData(grpMetas); + else + return; vit = mGroupUpdates.begin(); for(; vit != mGroupUpdates.end(); vit++)