From 4807123ba77c4018a1fcfa31cee04001c07ba4c5 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Wed, 28 Sep 2011 12:34:58 +0200 Subject: feh_draw_info: Do not fail if the info_cmd did not output anything --- ChangeLog | 1 + src/imlib.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/ChangeLog b/ChangeLog index cf4027d..f722a04 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@ git HEAD * The --bg-options now accept multiple filenames, one per Xinerama screen + * Fix --info bug when the command wrote no lines to stdout Mon, 26 Sep 2011 09:35:41 +0200 Daniel Friesel diff --git a/src/imlib.c b/src/imlib.c index 28ae018..fc7fb16 100644 --- a/src/imlib.c +++ b/src/imlib.c @@ -543,6 +543,9 @@ void feh_draw_info(winwidget w) pclose(info_pipe); } + if (no_lines == 0) + return; + height *= no_lines; width += 4; -- cgit v1.2.3