Fixed segfault caused by image removal in thumbnail mode
This commit is contained in:
parent
2fbc21a205
commit
52e56c8924
2
Makefile
2
Makefile
|
@ -1,4 +1,4 @@
|
||||||
VERSION = git-20140901
|
VERSION = git-20140911
|
||||||
|
|
||||||
PREFIX = /usr/local
|
PREFIX = /usr/local
|
||||||
MANPREFIX = $(PREFIX)/share/man
|
MANPREFIX = $(PREFIX)/share/man
|
||||||
|
|
2
main.c
2
main.c
|
@ -187,7 +187,7 @@ void remove_file(int n, bool manual)
|
||||||
filecnt--;
|
filecnt--;
|
||||||
if (n < tns.cnt)
|
if (n < tns.cnt)
|
||||||
tns.cnt--;
|
tns.cnt--;
|
||||||
if (mode == MODE_THUMB && fileidx >= tns.cnt)
|
if (mode == MODE_THUMB && tns.cnt > 0 && fileidx >= tns.cnt)
|
||||||
fileidx = tns.cnt - 1;
|
fileidx = tns.cnt - 1;
|
||||||
if (n < alternate)
|
if (n < alternate)
|
||||||
alternate--;
|
alternate--;
|
||||||
|
|
Loading…
Reference in a new issue