Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Eisel <julian@blender.org>2021-12-07 14:01:24 +0300
committerJulian Eisel <julian@blender.org>2021-12-07 14:03:10 +0300
commitae5a89e80af78b85877a049d392a84553f2791aa (patch)
tree14b9144f735f588d7397aaa33e39006104873386
parent4312cb854517ded8a576c2b53c8e92258eed7cce (diff)
Fix T93797, T93809: Crash/undefined-behavior when opening demo file
Error in d5efda72f501. Was changing an iteration that would free items to an iterator that is not safe for use in such cases. There still seem to be significant issues with the rendering, but that's a separate issue to be fixed.
-rw-r--r--source/blender/nodes/shader/node_shader_tree.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/nodes/shader/node_shader_tree.cc b/source/blender/nodes/shader/node_shader_tree.cc
index e913ca24130..9b2c48f4fb3 100644
--- a/source/blender/nodes/shader/node_shader_tree.cc
+++ b/source/blender/nodes/shader/node_shader_tree.cc
@@ -140,7 +140,7 @@ static void foreach_nodeclass(Scene *UNUSED(scene), void *calldata, bNodeClassCa
static void localize(bNodeTree *localtree, bNodeTree *UNUSED(ntree))
{
/* replace muted nodes and reroute nodes by internal links */
- LISTBASE_FOREACH (bNode *, node, &localtree->nodes) {
+ LISTBASE_FOREACH_MUTABLE (bNode *, node, &localtree->nodes) {
if (node->flag & NODE_MUTED || node->type == NODE_REROUTE) {
nodeInternalRelink(localtree, node);
ntreeFreeLocalNode(localtree, node);