increase the reference counts when setting default scene compo nodes else removing...
authorCampbell Barton <ideasman42@gmail.com>
Wed, 1 Dec 2010 08:49:08 +0000 (08:49 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 1 Dec 2010 08:49:08 +0000 (08:49 +0000)
source/blender/editors/space_node/node_edit.c

index 28de4c2..46ebfad 100644 (file)
@@ -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 */