From fd7728883a63820674332b04bc9000f1acb380f8 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 1 Dec 2010 08:49:08 +0000 Subject: increase the reference counts when setting default scene compo nodes else removing them can set the user count < 0. --- source/blender/editors/space_node/node_edit.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source') 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 */ -- cgit v1.2.3