doxygen: blender/editors tagged.
[blender.git] / source / blender / editors / space_node / node_select.c
index 748ba847f222e2babb4338f1642186b38212c675..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"
@@ -137,6 +142,7 @@ void NODE_OT_select(wmOperatorType *ot)
        /* identifiers */
        ot->name= "Select";
        ot->idname= "NODE_OT_select";
+       ot->description= "Select node under cursor";
        
        /* api callbacks */
        ot->invoke= node_select_invoke;
@@ -287,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;
        }
        
@@ -327,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;
        }