Fix: Assert in geometry nodes in specific files

Possibly also fixes write past array boundaries.

Happens with the mikassa-shading.blend file, by simply opening
the file in debug mode. The fix is suggested by Jacques.

Pull Request: https://projects.blender.org/blender/blender/pulls/117331
This commit is contained in:
Sergey Sharybin
2024-01-19 14:52:43 +01:00
committed by Sergey Sharybin
parent 4b47b46f9c
commit f8c283d2b7

View File

@@ -598,7 +598,7 @@ class LazyFunctionForMutedNode : public LazyFunction {
fn_input.usage = lf::ValueUsage::Unused;
}
input_by_output_index_.reinitialize(outputs_.size());
input_by_output_index_.reinitialize(node.output_sockets().size());
input_by_output_index_.fill(nullptr);
for (const bNodeLink &internal_link : node.internal_links()) {
const int input_i = r_lf_index_by_bsocket[internal_link.fromsock->index_in_tree()];