Fixed NPE when loading ogg chapters
This commit is contained in:
parent
3f1c1c4bf5
commit
9e68b8b0a3
|
@ -112,6 +112,9 @@ public class ChapterUtils {
|
||||||
VorbisCommentChapterReader reader = new VorbisCommentChapterReader();
|
VorbisCommentChapterReader reader = new VorbisCommentChapterReader();
|
||||||
reader.readInputStream(input);
|
reader.readInputStream(input);
|
||||||
List<Chapter> chapters = reader.getChapters();
|
List<Chapter> chapters = reader.getChapters();
|
||||||
|
if (chapters == null) {
|
||||||
|
return Collections.emptyList();
|
||||||
|
}
|
||||||
Collections.sort(chapters, new ChapterStartTimeComparator());
|
Collections.sort(chapters, new ChapterStartTimeComparator());
|
||||||
enumerateEmptyChapterTitles(chapters);
|
enumerateEmptyChapterTitles(chapters);
|
||||||
if (chaptersValid(chapters)) {
|
if (chaptersValid(chapters)) {
|
||||||
|
|
Loading…
Reference in New Issue