diff options
author | Damiano Galassi <[email protected]> | 2018-01-12 20:54:08 +0100 |
---|---|---|
committer | Damiano Galassi <[email protected]> | 2018-01-12 20:55:14 +0100 |
commit | 696ebe518b38bb186e7f6692f91a3c799f3c838c (patch) | |
tree | ecc88a4c55f1a5c0414f57fb175149b1fe8c9d3b /libhb/preset.c | |
parent | 9bd2b8e50ca2e8e0b52580714b54dbca33b809a5 (diff) |
libhb: fix a number of issues reported by clang.
Diffstat (limited to 'libhb/preset.c')
-rw-r--r-- | libhb/preset.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libhb/preset.c b/libhb/preset.c index 5840714ce..710499024 100644 --- a/libhb/preset.c +++ b/libhb/preset.c @@ -921,7 +921,6 @@ static void add_subtitle_for_lang(hb_value_array_t *list, hb_title_t *title, subtitle_behavior_t *behavior) { int t; - t = find_subtitle_track(title, lang, 0); for (t = find_subtitle_track(title, lang, 0); t >= 0; t = behavior->one ? -1 : find_subtitle_track(title, lang, t + 1)) @@ -3698,6 +3697,12 @@ int hb_presets_add_path(char * path) { count++; } + + if (count == 0) + { + return -1; + } + files = malloc(count * sizeof(char*)); // Find all regular files |