Commit 41231690 authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

get_index_string_dim: return 0,0 when index_info is empty (closes #76)

parent 3d67b0d5
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -4,6 +4,8 @@ git HEAD
    * Pause slideshow when editing captions
    * Makefile: Respect CPPFLAGS when creating deps.mk
      <https://github.com/derf/feh/issues/74>
    * Fix --montage mode
      <https://github.com/derf/feh/issues/76>

Wed, 02 Nov 2011 10:56:10 +0100  Daniel Friesel <derf@finalrewind.org>

+4 −1
Original line number Diff line number Diff line
@@ -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,