summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordaniel oeh <daniel.oeh@gmail.com>2012-09-22 12:44:23 +0200
committerdaniel oeh <daniel.oeh@gmail.com>2012-09-22 12:44:23 +0200
commit27dd1df40af187165fa7a2a59ad95ede6ed00a0b (patch)
treea24f786cb74227f0a4ab1d20d336926827f597a1
parent142f3cb9dbd9babae91146d1d972f80b598c59a5 (diff)
downloadAntennaPod-27dd1df40af187165fa7a2a59ad95ede6ed00a0b.zip
chapterValid() now tests for empty chapter lists
-rw-r--r--src/de/danoeh/antennapod/util/ChapterUtils.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/de/danoeh/antennapod/util/ChapterUtils.java b/src/de/danoeh/antennapod/util/ChapterUtils.java
index 65fb6daf2..4e153a9f9 100644
--- a/src/de/danoeh/antennapod/util/ChapterUtils.java
+++ b/src/de/danoeh/antennapod/util/ChapterUtils.java
@@ -145,6 +145,9 @@ public class ChapterUtils {
}
private static boolean chaptersValid(List<Chapter> chapters) {
+ if (chapters.isEmpty()) {
+ return false;
+ }
for (Chapter c : chapters) {
if (c.getTitle() == null) {
return false;