about summary refs log tree commit diff
path: root/src/rt/rust_task.cpp
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2011-11-10 17:53:19 -0800
committerBrian Anderson <banderson@mozilla.com>2011-11-10 17:53:19 -0800
commit793da65a8eb060268056861d1a82761747aa52a2 (patch)
treef785c38fafbd3b05f9e7077eeacee65f7ecbf81e /src/rt/rust_task.cpp
parent371574f64b4f51d05c9af951d3f5525142841cc7 (diff)
downloadrust-793da65a8eb060268056861d1a82761747aa52a2.tar.gz
rust-793da65a8eb060268056861d1a82761747aa52a2.zip
rt: Move rust_chan::send to rust_port::send
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();
+            }
         }
     }