forked from j62/ctbrec
1
0
Fork 0

Fix possible NPE in PlaylistGenerator

This commit is contained in:
0xboobface 2018-10-05 18:31:17 +02:00
parent d26b422350
commit c8eda9303b
1 changed files with 1 additions and 1 deletions

View File

@ -48,7 +48,7 @@ public class PlaylistGenerator {
LOG.debug("Starting playlist generation for {}", directory);
// get a list of all ts files and sort them by sequence
File[] files = directory.listFiles((f) -> f.getName().endsWith(".ts"));
if(files.length == 0) {
if(files == null || files.length == 0) {
LOG.debug("{} is empty. Not going to generate a playlist", directory);
return null;
}