diff --git a/kernel/src/proc/scheduler.c b/kernel/src/proc/scheduler.c index 4bbb764..37f9fd9 100644 --- a/kernel/src/proc/scheduler.c +++ b/kernel/src/proc/scheduler.c @@ -255,6 +255,9 @@ process_T* scheduler_get_process(pid_t pid) { uint32_t index_in_chunk = pid % SCHEDULER_PROCESS_CHUNK_SIZE; scheduler_processes_chunk_T* chunk = g_scheduler.processes; + if (chunk == NULL) { + return NULL; + } for (uint32_t i = 0; i < num_chunks; i++) { chunk = chunk->next;