From e973451a73a8f44ded8103a67ec4ea1d2d09d15e Mon Sep 17 00:00:00 2001 From: ed Date: Thu, 29 Aug 2019 11:53:28 +0100 Subject: [PATCH] Only print PerformanceCounter statistics on destruction if there were any runs --- modules/juce_core/time/juce_PerformanceCounter.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/juce_core/time/juce_PerformanceCounter.cpp b/modules/juce_core/time/juce_PerformanceCounter.cpp index 4650e16f17..5e15212d0e 100644 --- a/modules/juce_core/time/juce_PerformanceCounter.cpp +++ b/modules/juce_core/time/juce_PerformanceCounter.cpp @@ -43,7 +43,8 @@ PerformanceCounter::PerformanceCounter (const String& name, int runsPerPrintout, PerformanceCounter::~PerformanceCounter() { - printStatistics(); + if (stats.numRuns > 0) + printStatistics(); } PerformanceCounter::Statistics::Statistics() noexcept