diff --git a/src/system/kernel/scheduler/scheduler.cpp b/src/system/kernel/scheduler/scheduler.cpp index 27022e371c..f7fca91256 100644 --- a/src/system/kernel/scheduler/scheduler.cpp +++ b/src/system/kernel/scheduler/scheduler.cpp @@ -184,8 +184,8 @@ scheduler_set_thread_priority(Thread *thread, int32 priority) thread->priority = priority; threadData->CancelPenalty(); - if (priority == thread->priority) - return thread->priority; + if (priority == oldPriority) + return oldPriority; if (thread->state != B_THREAD_READY) { if (thread->state == B_THREAD_RUNNING) {