ScheduledWorkItem: do not call ScheduleClear() if not init in destructor

This avoids that unit tests trying to access a wq hang.
It still fails with an error currently.
This commit is contained in:
Beat Küng authored and Daniel Agar committed 2021-12-24 20:06:13 -05:00
1 parent 07306c4be3
commit fe1b726b62
1 file changed
+3 -1
@@ -38,7 +38,9 @@ namespace px4
ScheduledWorkItem::~ScheduledWorkItem()
{
ScheduleClear();
if (_call.arg != nullptr) {
ScheduleClear();
}
}
void ScheduledWorkItem::schedule_trampoline(void *arg)