mirror of
https://github.com/RetroShare/RetroShare.git
synced 2026-09-14 11:06:01 +05:00
Merge pull request #3175 from jolavillette/FixCrashInRTTStatistics
Fix std::list assertion crash in RttStatistics by checking if results are empty
This commit is contained in:
commit
5daca8ff7d
@ -104,13 +104,12 @@ void RttGraphSource::getValues(std::map<std::string,float>& vals) const
|
||||
rsPeers->getOnlineList(idList);
|
||||
|
||||
vals.clear() ;
|
||||
std::list<RsRttPongResult> results ;
|
||||
|
||||
for(std::list<RsPeerId>::const_iterator it(idList.begin());it!=idList.end();++it)
|
||||
{
|
||||
rsRtt->getPongResults(*it, 1, results);
|
||||
|
||||
vals[(*it).toStdString()] = results.back().mRTT ;
|
||||
std::list<RsRttPongResult> results ;
|
||||
if (rsRtt->getPongResults(*it, 1, results) > 0 && !results.empty()) {
|
||||
vals[(*it).toStdString()] = results.back().mRTT ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user