commit 5908e999513f7c062ede0ecb8653cc8688ac4399
parent 3c9b5bee50ad7c16d5bc5c88d69dc9978254cb20
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Wed, 24 Jun 2020 19:09:02 +0200
fix crash when there are no items
printf '' | ./sfeed_curses
Diffstat:
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/sfeed_curses.c b/sfeed_curses.c
@@ -1128,9 +1128,11 @@ draw(void)
}
/* if item selection text changed, update the status text */
- if ((row = pane_row_get(&panes[PaneItems], panes[PaneItems].pos))) {
+ if (panes[PaneItems].nrows &&
+ (row = pane_row_get(&panes[PaneItems], panes[PaneItems].pos))) {
item = (struct item *)row->data;
- statusbar_update(&statusbar, item->url);
+ if (item->url)
+ statusbar_update(&statusbar, item->url);
} else {
statusbar_update(&statusbar, "");
}