mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
fixed potential crash when an entry in mRemoteDirectories is NULL
This commit is contained in:
parent
1125dfe6d1
commit
3beaa974b0
@ -207,19 +207,20 @@ int p3FileDatabase::tick()
|
||||
mServCtrl->getPeersConnected(getServiceInfo().mServiceType, online_peers) ;
|
||||
|
||||
for(uint32_t i=0;i<mRemoteDirectories.size();++i)
|
||||
{
|
||||
if(online_peers.find(mRemoteDirectories[i]->peerId()) != online_peers.end())
|
||||
if(mRemoteDirectories[i] != NULL)
|
||||
{
|
||||
if(online_peers.find(mRemoteDirectories[i]->peerId()) != online_peers.end())
|
||||
{
|
||||
#ifdef DEBUG_FILE_HIERARCHY
|
||||
P3FILELISTS_DEBUG() << "Launching recurs sweep of friend directory " << mRemoteDirectories[i]->peerId() << ". Content currently is:" << std::endl;
|
||||
mRemoteDirectories[i]->print();
|
||||
P3FILELISTS_DEBUG() << "Launching recurs sweep of friend directory " << mRemoteDirectories[i]->peerId() << ". Content currently is:" << std::endl;
|
||||
mRemoteDirectories[i]->print();
|
||||
#endif
|
||||
|
||||
locked_recursSweepRemoteDirectory(mRemoteDirectories[i],mRemoteDirectories[i]->root(),0) ;
|
||||
}
|
||||
locked_recursSweepRemoteDirectory(mRemoteDirectories[i],mRemoteDirectories[i]->root(),0) ;
|
||||
}
|
||||
|
||||
mRemoteDirectories[i]->checkSave() ;
|
||||
}
|
||||
mRemoteDirectories[i]->checkSave() ;
|
||||
}
|
||||
|
||||
mLastRemoteDirSweepTS = now;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user