summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Spilsbury <Sam@XPS-SUSE.site>2009-03-15 10:38:05 +0900
committerSam Spilsbury <Sam@XPS-SUSE.site>2009-03-15 10:38:05 +0900
commitd84a264d5749a990129e37a31e79f5e8d6b8d2d2 (patch)
tree37a466becaa28ad667204966b0bc1fa490fbcaf4
parent03639589816e14f1e9a0138dee1deaf3a8c20b73 (diff)
downloadmousepoll-d84a264d5749a990129e37a31e79f5e8d6b8d2d2.tar.gz
mousepoll-d84a264d5749a990129e37a31e79f5e8d6b8d2d2.tar.bz2
Check to see if we have already stopped the poller
-rw-r--r--mousepoll.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/mousepoll.cpp b/mousepoll.cpp
index bc9be3b..fdd711d 100644
--- a/mousepoll.cpp
+++ b/mousepoll.cpp
@@ -101,7 +101,7 @@ MousepollScreen::removeTimer (MousePoller *poller)
if (it == pollers.end ())
return;
- pollers.erase (it);
+ pollers.remove (it);
if (pollers.empty ())
timer.stop ();
@@ -151,6 +151,11 @@ MousePoller::stop ()
{
MOUSEPOLL_SCREEN (screen);
+ /* Prevent broken plugins from calling stop () twice */
+
+ if (!mActive)
+ return;
+
if (!ms)
{
compLogMessage ("mousepoll",