doxygen: blender/editors tagged.
[blender.git] / source / blender / editors / space_node / node_select.c
index b53ac07aab3e3aabf712a7d0c799ea69cae7ad8a..4aa56ef370d4fbcd3b44e4f6fa2dc4523bdd3170 100644 (file)
@@ -1,4 +1,4 @@
-/**
+/*
  * $Id$
  *
  * ***** BEGIN GPL LICENSE BLOCK *****
  * ***** END GPL LICENSE BLOCK *****
  */
 
+/** \file blender/editors/space_node/node_select.c
+ *  \ingroup spnode
+ */
+
+
 #include <stdio.h>
 
 #include "DNA_node_types.h"
@@ -288,7 +293,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 +333,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;
        }