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,6 +45,11 @@ public:
|
||||||
:loop(_loop), active(false) {}
|
:loop(_loop), active(false) {}
|
||||||
|
|
||||||
~IdleMonitor() {
|
~IdleMonitor() {
|
||||||
|
#ifndef NDEBUG
|
||||||
|
/* this check is redundant, it is only here to avoid
|
||||||
|
the assertion in Cancel() */
|
||||||
|
if (IsActive())
|
||||||
|
#endif
|
||||||
Cancel();
|
Cancel();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue