From 87c3796e84e948cd61a210dce395199240afbb59 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sun, 1 Nov 2020 14:45:26 +0100 Subject: [PATCH] Fix division by zero if no sampling data is present. --- server/TracyView.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index 3a7b3f35..34cca8b4 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -12531,7 +12531,7 @@ void View::DrawStatistics() ImGui::Separator(); double revSampleCount100; - if( m_statRange.active ) + if( m_statRange.active && m_worker.GetSamplingPeriod() != 0 ) { const auto st = m_statRange.max - m_statRange.min; const auto cnt = st / m_worker.GetSamplingPeriod();