From e8c813c38c40b25373e6fa897a05fd57fcc98b97 Mon Sep 17 00:00:00 2001 From: akir Date: Sun, 19 Sep 2004 21:15:47 +0000 Subject: fixed a minor bug that can lead to HIGH cpuload under some circumstances. actually we must ensure that only timers with a valid handle are added to the timerslist. --- src/FbTk/Timer.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/FbTk/Timer.cc b/src/FbTk/Timer.cc index 9ac0824..ddc24ea 100644 --- a/src/FbTk/Timer.cc +++ b/src/FbTk/Timer.cc @@ -84,7 +84,8 @@ void Timer::setCommand(RefCount &cmd) { void Timer::start() { gettimeofday(&m_start, 0); - if (! m_timing) { + // only add Timers that actually DO something + if (! m_timing && *m_handler) { m_timing = true; addTimer(this); //add us to the list } -- cgit v0.11.2