nsxiv25077ac
Fixed segfault when run with -c
+2 −2
2 files changed
| @@ -1,4 +1,4 @@ | |||
| 1 | − | VERSION = git-20141025 | |
| 1 | + | VERSION = git-20141029 | |
| 2 | 2 | ||
| 3 | 3 | PREFIX = /usr/local | |
| 4 | 4 | MANPREFIX = $(PREFIX)/share/man | |
| @@ -161,7 +161,7 @@ void tns_init(tns_t *tns, const fileinfo_t *files, const int *cnt, int *sel, | |||
| 161 | 161 | if (tns == NULL) | |
| 162 | 162 | return; | |
| 163 | 163 | ||
| 164 | − | if (*cnt > 0) { | |
| 164 | + | if (cnt != NULL && *cnt > 0) { | |
| 165 | 165 | tns->thumbs = (thumb_t*) s_malloc(*cnt * sizeof(thumb_t)); | |
| 166 | 166 | memset(tns->thumbs, 0, *cnt * sizeof(thumb_t)); | |
| 167 | 167 | } else { | |