Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2014-02-07 23:07:10 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-02-07 23:24:05 +0400
commitb3afbcab8ff2330c1473647be330a3ffe9b11885 (patch)
treee86b9c7d9676e63b8da92da79889dee13b8be186 /source/blender/editors/space_console
parent1c24d954f4ac63f22b703756b6664a4ad1b363d4 (diff)
ListBase API: add utility api funcs for clearing and checking empty
Diffstat (limited to 'source/blender/editors/space_console')
-rw-r--r--source/blender/editors/space_console/space_console.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/space_console/space_console.c b/source/blender/editors/space_console/space_console.c
index 5c8d1e84fd5..c4cbab4f230 100644
--- a/source/blender/editors/space_console/space_console.c
+++ b/source/blender/editors/space_console/space_console.c
@@ -122,8 +122,8 @@ static SpaceLink *console_duplicate(SpaceLink *sl)
/* clear or remove stuff from old */
/* TODO - duplicate?, then we also need to duplicate the py namespace */
- sconsolen->scrollback.first = sconsolen->scrollback.last = NULL;
- sconsolen->history.first = sconsolen->history.last = NULL;
+ BLI_listbase_clear(&sconsolen->scrollback);
+ BLI_listbase_clear(&sconsolen->history);
return (SpaceLink *)sconsolen;
}
@@ -216,7 +216,7 @@ static void console_main_area_draw(const bContext *C, ARegion *ar)
View2D *v2d = &ar->v2d;
View2DScrollers *scrollers;
- if (sc->scrollback.first == NULL)
+ if (BLI_listbase_is_empty(&sc->scrollback))
WM_operator_name_call((bContext *)C, "CONSOLE_OT_banner", WM_OP_EXEC_DEFAULT, NULL);
/* clear and setup matrix */