diff options
author | ByteHamster <info@bytehamster.com> | 2021-02-16 16:09:18 +0100 |
---|---|---|
committer | ByteHamster <info@bytehamster.com> | 2021-02-16 16:09:18 +0100 |
commit | 9e68b8b0a31c988a7ad0f67b0438f8a398af6563 (patch) | |
tree | 8db755cb437462da631a41c39391c80b95f2102d /core | |
parent | 3f1c1c4bf5915f73d4339285076dd83e59449943 (diff) | |
download | AntennaPod-9e68b8b0a31c988a7ad0f67b0438f8a398af6563.zip |
Fixed NPE when loading ogg chapters
Diffstat (limited to 'core')
-rw-r--r-- | core/src/main/java/de/danoeh/antennapod/core/util/ChapterUtils.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/core/src/main/java/de/danoeh/antennapod/core/util/ChapterUtils.java b/core/src/main/java/de/danoeh/antennapod/core/util/ChapterUtils.java index e76d0b024..4ad35d0c2 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/util/ChapterUtils.java +++ b/core/src/main/java/de/danoeh/antennapod/core/util/ChapterUtils.java @@ -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)) { |