Fix T61572: Crash when copy/pasting nodes

was caused by rBc6e3a20ab60b, copied node was actually added to the
nodetree, resulting in an endless loop.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D4360
This commit is contained in:
Philipp Oeser 2019-02-15 14:29:10 +01:00
parent 6e40e3489f
commit 7e3a395d86
1 changed files with 1 additions and 1 deletions

View File

@ -1922,7 +1922,7 @@ static int node_clipboard_copy_exec(bContext *C, wmOperator *UNUSED(op))
for (node = ntree->nodes.first; node; node = node->next) {
if (node->flag & SELECT) {
/* No ID refcounting, this node is virtual, detached from any actual Blender data currently. */
bNode *new_node = BKE_node_copy_ex(ntree, node, LIB_ID_CREATE_NO_USER_REFCOUNT);
bNode *new_node = BKE_node_copy_ex(NULL, node, LIB_ID_CREATE_NO_USER_REFCOUNT);
BKE_node_clipboard_add_node(new_node);
}
}