From fa4336dd26378b6d4b80085aecae8f50e649ac99 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Wed, 2 Sep 2026 00:07:27 +0200 Subject: [PATCH] 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. --- capture/src/CaptureOutput.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/capture/src/CaptureOutput.cpp b/capture/src/CaptureOutput.cpp index 8d4fb3a6..55be89f4 100644 --- a/capture/src/CaptureOutput.cpp +++ b/capture/src/CaptureOutput.cpp @@ -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();