You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Merge pull request #108768 from WinnerWind/fix-zero-threadcount
FIX: Prevent crashing if `max_threads` is zero.
This commit is contained in:
@@ -823,7 +823,7 @@ void WorkerThreadPool::init(int p_thread_count, float p_low_priority_task_ratio)
|
||||
|
||||
runlevel = RUNLEVEL_NORMAL;
|
||||
|
||||
if (p_thread_count < 0) {
|
||||
if (p_thread_count <= 0) {
|
||||
p_thread_count = OS::get_singleton()->get_default_thread_pool_size();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user