summaryrefslogtreecommitdiff
path: root/src/index.c
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2011-12-23 17:49:48 +0100
committerDaniel Friesel <derf@finalrewind.org>2011-12-23 17:49:48 +0100
commit412316900b62656d7e25ce07cb4a7af3f2bce26e (patch)
treea9765775cc54ad57dcbe7082f05d5274ebbda6a0 /src/index.c
parent3d67b0d52933f117472edbb46922c0989e9e2813 (diff)
get_index_string_dim: return 0,0 when index_info is empty (closes #76)
Diffstat (limited to 'src/index.c')
-rw-r--r--src/index.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/index.c b/src/index.c
index 2bb5787..b489c55 100644
--- a/src/index.c
+++ b/src/index.c
@@ -425,8 +425,11 @@ void get_index_string_dim(feh_file *file, Imlib_Font fn, int *fw, int *fh)
gib_list *line, *lines;
int max_w = 0, total_h = 0;
- if (!opt.index_info)
+ if (!opt.index_info) {
+ *fw = 0;
+ *fh = 0;
return;
+ }
/* called with file = NULL in the setup phase.
* We need a fake file, otherwise feh_printf will remove format specifiers,