From eca3080d248eed4368fa02e359ea8ea78a0a1c81 Mon Sep 17 00:00:00 2001 From: David Capello Date: Sat, 22 Dec 2018 23:56:35 -0300 Subject: [PATCH] Fix bug counting two consecutive Timer::start() calls as two different timers --- src/ui/timer.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/ui/timer.cpp b/src/ui/timer.cpp index 762c92eb1..45740919a 100644 --- a/src/ui/timer.cpp +++ b/src/ui/timer.cpp @@ -57,8 +57,10 @@ void Timer::start() assert_ui_thread(); m_lastTick = base::current_tick(); - m_running = true; - ++running_timers; + if (!m_running) { + m_running = true; + ++running_timers; + } } void Timer::stop()