diff --git a/libretroshare/src/ft/ftdatamultiplex.cc b/libretroshare/src/ft/ftdatamultiplex.cc index 8403082df..3d45a8db0 100644 --- a/libretroshare/src/ft/ftdatamultiplex.cc +++ b/libretroshare/src/ft/ftdatamultiplex.cc @@ -478,7 +478,11 @@ bool ftDataMultiplex::handleRecvServerChunkMapRequest(const std::string& peerId, RsStackMutex stack(dataMtx); /******* LOCK MUTEX ******/ it = mServers.find(hash) ; - it->second->getAvailabilityMap(cmap); + + if(it == mServers.end()) // handleSearchRequest should have filled mServers[hash], but we have been off-mutex since, + return false ; // so it's safer to check again. + else + it->second->getAvailabilityMap(cmap); } mDataSend->sendChunkMap(peerId,hash,cmap);