Krolyxon
Commit 52e56c8

Branches

Refs →

nsxiv52e56c8

Fixed segfault caused by image removal in thumbnail mode

Author
Bert Münnich
Date
2014-09-11 22:22 +0200
Parent
2fbc21a
Commit
52e56c892460e7d1f63ca557b705812f08d6d20c

+2 −2

2 files changed

  1. M Makefile +1 −1
  2. M main.c +1 −1
M Makefile View
@@ -1,4 +1,4 @@
1−VERSION = git-20140901
1+VERSION = git-20140911
22
33 PREFIX = /usr/local
44 MANPREFIX = $(PREFIX)/share/man
M main.c View
@@ -187,7 +187,7 @@ void remove_file(int n, bool manual)
187187 filecnt--;
188188 if (n < tns.cnt)
189189 tns.cnt--;
190− if (mode == MODE_THUMB && fileidx >= tns.cnt)
190+ if (mode == MODE_THUMB && tns.cnt > 0 && fileidx >= tns.cnt)
191191 fileidx = tns.cnt - 1;
192192 if (n < alternate)
193193 alternate--;