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:
Diffstat (limited to 'source/blender/editors/space_node/space_node.c')
-rw-r--r--source/blender/editors/space_node/space_node.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/editors/space_node/space_node.c b/source/blender/editors/space_node/space_node.c
index 07fa6997e99..8d6363d3bbe 100644
--- a/source/blender/editors/space_node/space_node.c
+++ b/source/blender/editors/space_node/space_node.c
@@ -41,6 +41,7 @@
#include "BLI_math.h"
#include "BKE_context.h"
+#include "BKE_library.h"
#include "BKE_screen.h"
#include "BKE_node.h"
@@ -83,6 +84,8 @@ void ED_node_tree_start(SpaceNode *snode, bNodeTree *ntree, ID *id, ID *from)
BLI_strncpy(path->node_name, id->name + 2, sizeof(path->node_name));
BLI_addtail(&snode->treepath, path);
+
+ id_us_ensure_real(&ntree->id);
}
/* update current tree */
@@ -116,6 +119,8 @@ void ED_node_tree_push(SpaceNode *snode, bNodeTree *ntree, bNode *gnode)
BLI_addtail(&snode->treepath, path);
+ id_us_ensure_real(&ntree->id);
+
/* update current tree */
snode->edittree = ntree;