Fixed NPE when loading ogg chapters

This commit is contained in:
ByteHamster 2021-02-16 16:09:18 +01:00
parent 3f1c1c4bf5
commit 9e68b8b0a3
1 changed files with 3 additions and 0 deletions

View File

@ -112,6 +112,9 @@ public class ChapterUtils {
VorbisCommentChapterReader reader = new VorbisCommentChapterReader();
reader.readInputStream(input);
List<Chapter> chapters = reader.getChapters();
if (chapters == null) {
return Collections.emptyList();
}
Collections.sort(chapters, new ChapterStartTimeComparator());
enumerateEmptyChapterTitles(chapters);
if (chaptersValid(chapters)) {