diff options
author | Bert Münnich <ber.t@posteo.de> | 2014-10-29 14:20:54 +0100 |
---|---|---|
committer | Bert Münnich <ber.t@posteo.de> | 2014-10-29 14:20:54 +0100 |
commit | 25077ac764819f1b555044e54d6bf6b2a1c79aeb (patch) | |
tree | 73a09c8aa8aaabe398c31fa118e4de8b6de898c8 /thumbs.c | |
parent | 33b8148614c47a091da1a711fb53f94827a9cf51 (diff) |
Fixed segfault when run with -c
Diffstat (limited to 'thumbs.c')
-rw-r--r-- | thumbs.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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 { |