diff --git a/libretroshare/src/pqi/pqistore.cc b/libretroshare/src/pqi/pqistore.cc index ca6d23820..c94917de8 100644 --- a/libretroshare/src/pqi/pqistore.cc +++ b/libretroshare/src/pqi/pqistore.cc @@ -394,10 +394,9 @@ bool pqiSSLstore::encryptedSendItems(const std::list& rsItemList) uint32_t offset = 0; for(it = rsItemList.begin(); it != rsItemList.end(); ++it) - if(*it != NULL) - sizeItems += rsSerialiser->size(*it); + if(*it != NULL) sizeItems += rsSerialiser->size(*it); - RsTemporaryMemory data(sizeItems) ; + RsTemporaryMemory data( sizeItems ? sizeItems : 1 ); for(it = rsItemList.begin(); it != rsItemList.end(); ++it) if(*it != NULL)