about summary refs log tree commit diff
path: root/src/rt/rust_task.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/rt/rust_task.cpp')
-rw-r--r--src/rt/rust_task.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/rt/rust_task.cpp b/src/rt/rust_task.cpp
index 5043f9ec4b0..854c2c74462 100644
--- a/src/rt/rust_task.cpp
+++ b/src/rt/rust_task.cpp
@@ -133,8 +133,10 @@ rust_task::~rust_task()
             msg.id = user.id;
             msg.result = failed ? tr_failure : tr_success;
 
-            target->send(&msg);
-            target->deref();
+            if (target->is_associated()) {
+                target->port->send(&msg);
+                target->deref();
+            }
         }
     }