Merging r46414 through r46455 from trunk into soc-2011-tomato
[blender-staging.git] / source / blender / makesrna / intern / rna_nodetree.c
index 7383cb38cdd1b8108bd557157f0abb7441af06b4..a46fe830ddd355fc9e3eeb48c6e04a45336b5c49 100644 (file)
@@ -736,7 +736,8 @@ static bNodeLink *rna_NodeTree_link_new(bNodeTree *ntree, ReportList *reports,
        ret = nodeAddLink(ntree, fromnode, fromsock, tonode, tosock);
        
        if (ret) {
-               nodeUpdate(ntree, tonode);
+               if (tonode)
+                       nodeUpdate(ntree, tonode);
 
                ntreeUpdateTree(ntree);