diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-02-07 23:07:10 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-02-07 23:24:05 +0400 |
commit | b3afbcab8ff2330c1473647be330a3ffe9b11885 (patch) | |
tree | e86b9c7d9676e63b8da92da79889dee13b8be186 /source/blender/editors/space_node/node_relationships.c | |
parent | 1c24d954f4ac63f22b703756b6664a4ad1b363d4 (diff) |
ListBase API: add utility api funcs for clearing and checking empty
Diffstat (limited to 'source/blender/editors/space_node/node_relationships.c')
-rw-r--r-- | source/blender/editors/space_node/node_relationships.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/space_node/node_relationships.c b/source/blender/editors/space_node/node_relationships.c index 31a9ec70660..3e1e605682f 100644 --- a/source/blender/editors/space_node/node_relationships.c +++ b/source/blender/editors/space_node/node_relationships.c @@ -274,7 +274,7 @@ static int node_link_viewer(const bContext *C, bNode *tonode) bNodeSocket *sock; /* context check */ - if (tonode == NULL || tonode->outputs.first == NULL) + if (tonode == NULL || BLI_listbase_is_empty(&tonode->outputs)) return OPERATOR_CANCELLED; if (ELEM(tonode->type, CMP_NODE_VIEWER, CMP_NODE_SPLITVIEWER)) return OPERATOR_CANCELLED; @@ -1209,7 +1209,7 @@ static bool ed_node_link_conditions(ScrArea *sa, bool test, SpaceNode **r_snode, return false; /* correct node */ - if (select->inputs.first == NULL || select->outputs.first == NULL) + if (BLI_listbase_is_empty(&select->inputs) || BLI_listbase_is_empty(&select->outputs)) return false; /* test node for links */ |