aboutsummaryrefslogtreecommitdiffstats
path: root/thumbs.c
diff options
context:
space:
mode:
Diffstat (limited to 'thumbs.c')
-rw-r--r--thumbs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/thumbs.c b/thumbs.c
index 5328d3a..a8f498b 100644
--- 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 {