Fix division by zero if no sampling data is present.

This commit is contained in:
Bartosz Taudul 2020-11-01 14:45:26 +01:00
parent 76e2ae484b
commit 87c3796e84

View File

@ -12531,7 +12531,7 @@ void View::DrawStatistics()
ImGui::Separator(); ImGui::Separator();
double revSampleCount100; 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 st = m_statRange.max - m_statRange.min;
const auto cnt = st / m_worker.GetSamplingPeriod(); const auto cnt = st / m_worker.GetSamplingPeriod();