kernel: check for NULL core in power_saving mode choose_core()

Change-Id: I94fccef73c4254888ad71dfbc748fac72e5bc124
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7795
Reviewed-by: Jérôme Duval <[email protected]>
Haiku-Format: Haiku-format Bot <[email protected]>
This commit is contained in:
Jérôme Duval
2024-06-26 10:35:33 +00:00
parent d1c8e2fe7c
commit 28748463d9
+1 -1
View File
@@ -96,7 +96,7 @@ choose_core(const ThreadData* threadData)
// try to pack all threads on one core
core = choose_small_task_core();
if (!core->CPUMask().Matches(mask))
if (core != NULL && !core->CPUMask().Matches(mask))
core = NULL;
if (core == NULL || core->GetLoad() + threadData->GetLoad() >= kHighLoad) {