summaryrefslogtreecommitdiffstats
path: root/libhb/batch.c
diff options
context:
space:
mode:
authorDamiano Galassi <[email protected]>2018-01-12 20:54:08 +0100
committerDamiano Galassi <[email protected]>2018-01-12 20:55:14 +0100
commit696ebe518b38bb186e7f6692f91a3c799f3c838c (patch)
treeecc88a4c55f1a5c0414f57fb175149b1fe8c9d3b /libhb/batch.c
parent9bd2b8e50ca2e8e0b52580714b54dbca33b809a5 (diff)
libhb: fix a number of issues reported by clang.
Diffstat (limited to 'libhb/batch.c')
-rw-r--r--libhb/batch.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libhb/batch.c b/libhb/batch.c
index 1ae70d9ec..050d1e0c8 100644
--- a/libhb/batch.c
+++ b/libhb/batch.c
@@ -53,6 +53,12 @@ hb_batch_t * hb_batch_init( hb_handle_t *h, char * path )
{
count++;
}
+
+ if (count == 0)
+ {
+ return NULL;
+ }
+
files = malloc(count * sizeof(char*));
// Find all regular files