Fix T103526: crash when subsurface connects to Shader to RGB

This was caused by {rB7b82d8f029cd1088efd5fbb8bf}.
This commit is contained in:
Jacques Lucke 2022-12-29 14:19:50 +01:00
parent 8c194e1ba6
commit 72b4f91914
Notes: blender-bot 2023-02-14 08:08:54 +01:00
Referenced by issue #103526, Regression: Crash when subsurface (sss) connects to Shader to RGB
1 changed files with 1 additions and 0 deletions

View File

@ -588,6 +588,7 @@ static bNode *ntree_shader_copy_branch(bNodeTree *ntree,
nodeUniqueID(ntree, nodes_copy[id]);
nodes_copy[id]->runtime->tmp_flag = -2; /* Copy */
nodes_copy[id]->runtime->original = node->runtime->original;
/* Make sure to clear all sockets links as they are invalid. */
LISTBASE_FOREACH (bNodeSocket *, sock, &nodes_copy[id]->inputs) {
sock->link = nullptr;