diff options
author | Bert Münnich <ber.t@posteo.de> | 2014-09-11 22:22:51 +0200 |
---|---|---|
committer | Bert Münnich <ber.t@posteo.de> | 2014-09-11 22:22:51 +0200 |
commit | 52e56c892460e7d1f63ca557b705812f08d6d20c (patch) | |
tree | 65672a52c500f040d69a84819ae9d4685ee13850 | |
parent | 2fbc21a2050d1e8e8711afce765b7d34104f45de (diff) |
Fixed segfault caused by image removal in thumbnail mode
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | main.c | 2 |
2 files changed, 2 insertions, 2 deletions
@@ -1,4 +1,4 @@ -VERSION = git-20140901 +VERSION = git-20140911 PREFIX = /usr/local MANPREFIX = $(PREFIX)/share/man @@ -187,7 +187,7 @@ void remove_file(int n, bool manual) filecnt--; if (n < 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; if (n < alternate) alternate--; |