Commit 617090cf authored by Max Kellermann's avatar Max Kellermann

event/IdleMonitor: cancel in destructor only if active

Debug-mode workaround for bogus assertion failure.
parent a9e604d5
......@@ -45,6 +45,11 @@ public:
:loop(_loop), active(false) {}
~IdleMonitor() {
#ifndef NDEBUG
/* this check is redundant, it is only here to avoid
the assertion in Cancel() */
if (IsActive())
#endif
Cancel();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment