diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/core/wee-infolist.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/core/wee-infolist.c b/src/core/wee-infolist.c index b8bdf8764..8cc53e27a 100644 --- a/src/core/wee-infolist.c +++ b/src/core/wee-infolist.c @@ -314,6 +314,9 @@ infolist_new_var_time (struct t_infolist_item *item, struct t_infolist_item * infolist_next (struct t_infolist *infolist) { + if (!infolist) + return NULL; + if (!infolist->ptr_item) { infolist->ptr_item = infolist->items; @@ -332,6 +335,9 @@ infolist_next (struct t_infolist *infolist) struct t_infolist_item * infolist_prev (struct t_infolist *infolist) { + if (!infolist) + return NULL; + if (!infolist->ptr_item) { infolist->ptr_item = infolist->last_item; @@ -348,6 +354,9 @@ infolist_prev (struct t_infolist *infolist) void infolist_reset_item_cursor (struct t_infolist *infolist) { + if (!infolist) + return; + infolist->ptr_item = NULL; } |