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
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2010-12-01 11:49:08 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-12-01 11:49:08 +0300
commitfd7728883a63820674332b04bc9000f1acb380f8 (patch)
tree696056cd5b4dfea1c9be85499e46949d949e9fb1 /source
parent3e173f4d2176e1915c501c0901e84dcc89e353a2 (diff)
increase the reference counts when setting default scene compo nodes else removing them can set the user count < 0.
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/space_node/node_edit.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c
index 28de4c232e9..46ebfad1ddf 100644
--- a/source/blender/editors/space_node/node_edit.c
+++ b/source/blender/editors/space_node/node_edit.c
@@ -280,10 +280,12 @@ void ED_node_composit_default(Scene *sce)
out= nodeAddNodeType(sce->nodetree, CMP_NODE_COMPOSITE, NULL, NULL);
out->locx= 300.0f; out->locy= 400.0f;
out->id= &sce->id;
+ id_us_plus(out->id);
in= nodeAddNodeType(sce->nodetree, CMP_NODE_R_LAYERS, NULL, NULL);
in->locx= 10.0f; in->locy= 400.0f;
in->id= &sce->id;
+ id_us_plus(in->id);
nodeSetActive(sce->nodetree, in);
/* links from color to color */