attempt at fixing crash that shoult not happen in rsgxsutil.cc

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8158 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2015-04-23 18:48:40 +00:00
parent 9ebe33c9de
commit 3641a6c87c

View File

@ -211,7 +211,12 @@ bool RsGxsIntegrityCheck::check()
pHash.addData(msg->msg.bin_data, msg->msg.bin_len);
pHash.Complete(currHash);
if(currHash != msg->metaData->mHash) msgsToDel[msg->grpId].push_back(msg->msgId);
if(msg->metaData == NULL || currHash != msg->metaData->mHash)
{
std::cerr << "(EE) deleting message data with wrong hash or null meta data. meta=" << (void*)msg->metaData << std::endl;
msgsToDel[msg->grpId].push_back(msg->msgId);
}
delete msg;
}
}