event/IdleMonitor: cancel in destructor only if active
Debug-mode workaround for bogus assertion failure.
This commit is contained in:
parent
a9e604d51d
commit
617090cfda
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue