Cleanup failure handling around rust_new_task_in_sched - closes #2668
This commit is contained in:
parent
d91e310982
commit
6fc730baf6
5 changed files with 9 additions and 3 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue