From b1101ed4292fc04faeedf26ac1717c01bde0b9a8 Mon Sep 17 00:00:00 2001 From: thunder2 Date: Thu, 13 Aug 2015 14:01:43 +0200 Subject: [PATCH] Prevent selecting data from the database in RsGxsNetService::syncWithPeers without online friends. --- libretroshare/src/gxs/rsgxsnetservice.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libretroshare/src/gxs/rsgxsnetservice.cc b/libretroshare/src/gxs/rsgxsnetservice.cc index ff70fe89e..26767f175 100644 --- a/libretroshare/src/gxs/rsgxsnetservice.cc +++ b/libretroshare/src/gxs/rsgxsnetservice.cc @@ -235,6 +235,10 @@ void RsGxsNetService::syncWithPeers() std::set peers; mNetMgr->getOnlineList(mServiceInfo.mServiceType, peers); + if (peers.empty()) { + // nothing to do + return; + } std::set::iterator sit = peers.begin();