summaryrefslogtreecommitdiff
path: root/src/timer.cpp
diff options
context:
space:
mode:
authorDanny Baumann <dannybaumann@web.de>2009-03-14 08:14:05 +0100
committerDanny Baumann <dannybaumann@web.de>2009-03-14 08:14:05 +0100
commit3a19ffb33598e097cb3b8a2d79e319249a0def2f (patch)
tree1b137a0beeeca050dda99b5006a347fa0059cfc5 /src/timer.cpp
parent28e45c55c11e20206d3bc9056aea8fc7f1b7a0e7 (diff)
downloadunity-window-decorator-3a19ffb33598e097cb3b8a2d79e319249a0def2f.tar.gz
unity-window-decorator-3a19ffb33598e097cb3b8a2d79e319249a0def2f.tar.bz2
Catch broken plugins that try to start timers without callback.
Diffstat (limited to 'src/timer.cpp')
-rw-r--r--src/timer.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/timer.cpp b/src/timer.cpp
index 39e076c..e025644 100644
--- a/src/timer.cpp
+++ b/src/timer.cpp
@@ -72,6 +72,14 @@ void
CompTimer::start ()
{
stop ();
+
+ if (mCallBack.empty ())
+ {
+ compLogMessage ("core", CompLogLevelWarn,
+ "Attempted to start timer without callback.");
+ return;
+ }
+
mActive = true;
screen->priv->addTimer (this);
}