Fix T93797, T93809: Crash/undefined-behavior when opening demo file
Error in d5efda72f5. 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.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user