Big node groups improvement patch. Node group trees now have their own lists of input...
[blender.git] / source / blender / editors / space_node / node_select.c
index b53ac07aab3e3aabf712a7d0c799ea69cae7ad8a..48e70be51e57d1d187263cd3d87bb8470e45842a 100644 (file)
@@ -288,7 +288,7 @@ static int node_select_linked_to_exec(bContext *C, wmOperator *UNUSED(op))
                node->flag &= ~NODE_TEST;
 
        for (link=snode->edittree->links.first; link; link=link->next) {
-               if (link->fromnode->flag & NODE_SELECT)
+               if (link->fromnode && link->tonode && (link->fromnode->flag & NODE_SELECT))
                        link->tonode->flag |= NODE_TEST;
        }
        
@@ -328,7 +328,7 @@ static int node_select_linked_from_exec(bContext *C, wmOperator *UNUSED(op))
                node->flag &= ~NODE_TEST;
 
        for(link=snode->edittree->links.first; link; link=link->next) {
-               if(link->tonode->flag & NODE_SELECT)
+               if(link->fromnode && link->tonode && (link->tonode->flag & NODE_SELECT))
                        link->fromnode->flag |= NODE_TEST;
        }