diff --git a/src/rt/rust_task.cpp b/src/rt/rust_task.cpp index 1bf62e42f014..86dfb3b666f9 100644 --- a/src/rt/rust_task.cpp +++ b/src/rt/rust_task.cpp @@ -482,11 +482,11 @@ rust_task::fail_parent() { void rust_task::unsupervise() { - DLOG(sched, task, + if (supervisor) { + DLOG(sched, task, "task %s @0x%" PRIxPTR " disconnecting from supervisor %s @0x%" PRIxPTR, name, this, supervisor->name, supervisor); - if (supervisor) { supervisor->deref(); } supervisor = NULL;