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, 5 insertions, 1 deletions
diff --git a/src/rt/rust_task.cpp b/src/rt/rust_task.cpp
index 14c223ddb91..f8fd01d4a49 100644
--- a/src/rt/rust_task.cpp
+++ b/src/rt/rust_task.cpp
@@ -196,7 +196,6 @@ void task_start_wrapper(spawn_args *a)
     if(env) {
         // free the environment (which should be a unique closure).
         const type_desc *td = env->td;
-        LOG(task, task, "Freeing env %p with td %p", env, td);
         td->drop_glue(NULL, NULL, td->first_param, box_body(env));
         upcall_free_shared_type_desc(env->td);
         upcall_shared_free(env);
@@ -720,6 +719,11 @@ Returns true if we're currently running on the Rust stack
  */
 bool
 rust_task::on_rust_stack() {
+    if (stk == NULL) {
+        // This only happens during construction
+        return false;
+    }
+
     uintptr_t sp = get_sp();
     bool in_first_segment = sp_in_stk_seg(sp, stk);
     if (in_first_segment) {