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 2021-12-09 16:17:25 +01:00 committed by Daniel Agar
parent 07306c4be3
commit fe1b726b62
1 changed files with 3 additions and 1 deletions

View File

@ -38,7 +38,9 @@ namespace px4
ScheduledWorkItem::~ScheduledWorkItem()
{
ScheduleClear();
if (_call.arg != nullptr) {
ScheduleClear();
}
}
void ScheduledWorkItem::schedule_trampoline(void *arg)