diff options
| author | Ben Blum <bblum@andrew.cmu.edu> | 2012-06-28 19:01:55 -0400 |
|---|---|---|
| committer | Ben Blum <bblum@andrew.cmu.edu> | 2012-06-28 19:02:48 -0400 |
| commit | 6fc730baf6b3d156e7be7521cd60f352f2c0ea93 (patch) | |
| tree | e472aa6ab0779ae281a50bbd05d8f86217f8bb67 /src/rt/rust_builtin.cpp | |
| parent | d91e3109824af5460bc2476bc6dbd74f8b0100d4 (diff) | |
| download | rust-6fc730baf6b3d156e7be7521cd60f352f2c0ea93.tar.gz rust-6fc730baf6b3d156e7be7521cd60f352f2c0ea93.zip | |
Cleanup failure handling around rust_new_task_in_sched - closes #2668
Diffstat (limited to 'src/rt/rust_builtin.cpp')
| -rw-r--r-- | src/rt/rust_builtin.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/rt/rust_builtin.cpp b/src/rt/rust_builtin.cpp index 04d11e020ea..a33d3cb90fe 100644 --- a/src/rt/rust_builtin.cpp +++ b/src/rt/rust_builtin.cpp @@ -630,7 +630,8 @@ extern "C" CDECL rust_task* rust_new_task_in_sched(rust_sched_id id) { rust_task *task = rust_get_current_task(); rust_scheduler *sched = task->kernel->get_scheduler_by_id(id); - // FIXME (#2668): What if we didn't get the scheduler? + if (sched == NULL) + return NULL; return new_task_common(sched, task); } |
