diff --git a/kernel/src/thread/Scheduler.cpp b/kernel/src/thread/Scheduler.cpp index 8d8a85c6..d0fad993 100644 --- a/kernel/src/thread/Scheduler.cpp +++ b/kernel/src/thread/Scheduler.cpp @@ -130,12 +130,7 @@ void Scheduler::load_user_task(const char* filename) ELFImage* image = ELFLoader::load_elf_from_filesystem( filename); // FIXME: TOCTOU? Right now, impossible, since interrupts are disabled and SMP is not a thing. But in // the future, it might be possible. - if (!image) - { - kerrorln("Failed to load %s from initrd", filename); - delete new_task; - return; - } + ASSERT(image); new_task->user_task = true; new_task->regs.rip = image->entry; new_task->image = image;