diff options
Diffstat (limited to '')
-rw-r--r-- | src/event/IdleMonitor.hxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/event/IdleMonitor.hxx b/src/event/IdleMonitor.hxx index 8d3928583..dac7ab5b0 100644 --- a/src/event/IdleMonitor.hxx +++ b/src/event/IdleMonitor.hxx @@ -45,7 +45,12 @@ public: :loop(_loop), active(false) {} ~IdleMonitor() { - Cancel(); +#ifndef NDEBUG + /* this check is redundant, it is only here to avoid + the assertion in Cancel() */ + if (IsActive()) +#endif + Cancel(); } EventLoop &GetEventLoop() const { |