Krolyxon
Commit 25077ac

Branches

Refs →

nsxiv25077ac

Fixed segfault when run with -c

Author
Bert Münnich
Date
2014-10-29 14:20 +0100
Parent
33b8148
Commit
25077ac764819f1b555044e54d6bf6b2a1c79aeb

+2 −2

2 files changed

  1. M Makefile +1 −1
  2. M thumbs.c +1 −1
M Makefile View
@@ -1,4 +1,4 @@
1−VERSION = git-20141025
1+VERSION = git-20141029
22
33 PREFIX = /usr/local
44 MANPREFIX = $(PREFIX)/share/man
M thumbs.c View
@@ -161,7 +161,7 @@ void tns_init(tns_t *tns, const fileinfo_t *files, const int *cnt, int *sel,
161161 if (tns == NULL)
162162 return;
163163
164− if (*cnt > 0) {
164+ if (cnt != NULL && *cnt > 0) {
165165 tns->thumbs = (thumb_t*) s_malloc(*cnt * sizeof(thumb_t));
166166 memset(tns->thumbs, 0, *cnt * sizeof(thumb_t));
167167 } else {