Fix empty rate sample list read in the progress line.

HasData() flips when the connection is established, but the rate
list is only filled by the worker periodic stats update, whose first
entry arrives ~200ms later, so the first render could read an empty
list.
This commit is contained in:
Bartosz Taudul
2026-09-02 00:07:27 +02:00
parent 89132aed2a
commit fa4336dd26

View File

@@ -166,7 +166,13 @@ void PrintCaptureProgress( tracy::Worker& worker, int64_t firstTime, int64_t mem
auto& lock = worker.GetMbpsDataLock();
lock.lock();
const auto mbps = worker.GetMbpsData().back();
const auto& mbpsData = worker.GetMbpsData();
if( mbpsData.empty() )
{
lock.unlock();
return;
}
const auto mbps = mbpsData.back();
const auto compRatio = worker.GetCompRatio();
const auto netTotal = worker.GetDataTransferred();
const auto queueSize = worker.GetSendQueueSize();