sxiv

simple X image viewer
git clone git://git.suckless.org/sxiv
Log | Files | Refs | LICENSE

commit 25077ac764819f1b555044e54d6bf6b2a1c79aeb
parent 33b8148614c47a091da1a711fb53f94827a9cf51
Author: Bert M√ľnnich <ber.t@posteo.de>
Date:   Wed, 29 Oct 2014 14:20:54 +0100

Fixed segfault when run with -c

Diffstat:
Makefile | 2+-
thumbs.c | 2+-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile @@ -1,4 +1,4 @@ -VERSION = git-20141025 +VERSION = git-20141029 PREFIX = /usr/local MANPREFIX = $(PREFIX)/share/man diff --git a/thumbs.c b/thumbs.c @@ -161,7 +161,7 @@ void tns_init(tns_t *tns, const fileinfo_t *files, const int *cnt, int *sel, if (tns == NULL) return; - if (*cnt > 0) { + if (cnt != NULL && *cnt > 0) { tns->thumbs = (thumb_t*) s_malloc(*cnt * sizeof(thumb_t)); memset(tns->thumbs, 0, *cnt * sizeof(thumb_t)); } else {