From 0e438e0a95d3a8ee277949c8b9fb5ce6da02c723 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Sun, 18 Feb 2018 15:33:50 +0100 Subject: [PATCH] cc_timer.cpp: don't loop if slot OnTimer is empty Just for safety and to save resources. --- src/gui/components/cc_timer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/components/cc_timer.cpp b/src/gui/components/cc_timer.cpp index 4283a6f14..11fa328f3 100644 --- a/src/gui/components/cc_timer.cpp +++ b/src/gui/components/cc_timer.cpp @@ -75,7 +75,7 @@ void CComponentsTimer::runSharedTimerAction() //start loop tn = "cc:"+name; set_threadname(tn.c_str()); - while(tm_enable && tm_interval > 0) { + while(tm_enable && tm_interval > 0 && !OnTimer.empty()) { tm_mutex.lock(); OnTimer(); if (!tm_enable_nano){