diff options
author | akir <akir> | 2004-09-19 21:15:47 (GMT) |
---|---|---|
committer | akir <akir> | 2004-09-19 21:15:47 (GMT) |
commit | e8c813c38c40b25373e6fa897a05fd57fcc98b97 (patch) | |
tree | 52c3fe66829a1aea1b751392e0efba373ec255c5 /src | |
parent | 87c7c80847255e6eddca9b9a819fb031915e8570 (diff) | |
download | fluxbox-e8c813c38c40b25373e6fa897a05fd57fcc98b97.zip fluxbox-e8c813c38c40b25373e6fa897a05fd57fcc98b97.tar.bz2 |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/FbTk/Timer.cc | 3 |
1 files changed, 2 insertions, 1 deletions
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<Command> &cmd) { | |||
84 | void Timer::start() { | 84 | void Timer::start() { |
85 | gettimeofday(&m_start, 0); | 85 | gettimeofday(&m_start, 0); |
86 | 86 | ||
87 | if (! m_timing) { | 87 | // only add Timers that actually DO something |
88 | if (! m_timing && *m_handler) { | ||
88 | m_timing = true; | 89 | m_timing = true; |
89 | addTimer(this); //add us to the list | 90 | addTimer(this); //add us to the list |
90 | } | 91 | } |