Fix: geometry nodes crashes with large trees

This was an oversight in rBdba2d828462ae22de5.
The evaluator uses multiple threads to initialize node states
but it is still in single threaded mode.
`get_main_or_local_allocator` did not return the right allocator
in this case.
This commit is contained in:
Jacques Lucke 2023-01-02 18:33:48 +01:00
parent 9144b110ee
commit 0bc0e3f9f7
1 changed files with 1 additions and 1 deletions

View File

@ -355,7 +355,7 @@ class Executor {
this->ensure_thread_locals();
/* Construct all node states in parallel. */
threading::parallel_for(nodes.index_range(), 256, [&](const IndexRange range) {
LinearAllocator<> &allocator = this->get_main_or_local_allocator();
LinearAllocator<> &allocator = thread_locals_->local().allocator;
construct_node_range(range, allocator);
});
}