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/gpencil/gpencil_undo.c | |
parent | 1c24d954f4ac63f22b703756b6664a4ad1b363d4 (diff) |
ListBase API: add utility api funcs for clearing and checking empty
Diffstat (limited to 'source/blender/editors/gpencil/gpencil_undo.c')
-rw-r--r-- | source/blender/editors/gpencil/gpencil_undo.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/gpencil/gpencil_undo.c b/source/blender/editors/gpencil/gpencil_undo.c index 7edf723022f..136e9da389d 100644 --- a/source/blender/editors/gpencil/gpencil_undo.c +++ b/source/blender/editors/gpencil/gpencil_undo.c @@ -63,7 +63,7 @@ static bGPundonode *cur_node = NULL; int ED_gpencil_session_active(void) { - return undo_nodes.first != NULL; + return (BLI_listbase_is_empty(&undo_nodes) == false); } int ED_undo_gpencil_step(bContext *C, int step, const char *name) @@ -100,7 +100,7 @@ int ED_undo_gpencil_step(bContext *C, int step, const char *name) free_gpencil_layers(&gpd->layers); /* copy layers */ - gpd->layers.first = gpd->layers.last = NULL; + BLI_listbase_clear(&gpd->layers); for (gpl = new_gpd->layers.first; gpl; gpl = gpl->next) { /* make a copy of source layer and its data */ |