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_kernel.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_kernel.cpp')
| -rw-r--r-- | src/rt/rust_kernel.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/rt/rust_kernel.cpp b/src/rt/rust_kernel.cpp index b13b1490c0f..82fec98e86a 100644 --- a/src/rt/rust_kernel.cpp +++ b/src/rt/rust_kernel.cpp @@ -121,7 +121,9 @@ rust_kernel::get_scheduler_by_id(rust_sched_id id) { rust_scheduler * rust_kernel::get_scheduler_by_id_nolock(rust_sched_id id) { - assert(id != 0 && "invalid scheduler id"); + if (id == 0) { + return NULL; + } sched_lock.must_have_lock(); sched_map::iterator iter = sched_table.find(id); if (iter != sched_table.end()) { |
