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/transform/transform_conversions.c | |
parent | 1c24d954f4ac63f22b703756b6664a4ad1b363d4 (diff) |
ListBase API: add utility api funcs for clearing and checking empty
Diffstat (limited to 'source/blender/editors/transform/transform_conversions.c')
-rw-r--r-- | source/blender/editors/transform/transform_conversions.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c index cedbc4658b6..e4bc3f8d45a 100644 --- a/source/blender/editors/transform/transform_conversions.c +++ b/source/blender/editors/transform/transform_conversions.c @@ -3051,11 +3051,11 @@ static void posttrans_gpd_clean(bGPdata *gpd) } /* error checking: it is unlikely, but may be possible to have none selected */ - if (sel_buffer.first == NULL) + if (BLI_listbase_is_empty(&sel_buffer)) continue; /* if all were selected (i.e. gpl->frames is empty), then just transfer sel-buf over */ - if (gpl->frames.first == NULL) { + if (BLI_listbase_is_empty(&gpl->frames)) { gpl->frames.first = sel_buffer.first; gpl->frames.last = sel_buffer.last; @@ -3141,11 +3141,11 @@ static void posttrans_mask_clean(Mask *mask) } /* error checking: it is unlikely, but may be possible to have none selected */ - if (sel_buffer.first == NULL) + if (BLI_listbase_is_empty(&sel_buffer)) continue; /* if all were selected (i.e. masklay->splines_shapes is empty), then just transfer sel-buf over */ - if (masklay->splines_shapes.first == NULL) { + if (BLI_listbase_is_empty(&masklay->splines_shapes)) { masklay->splines_shapes.first = sel_buffer.first; masklay->splines_shapes.last = sel_buffer.last; |