diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/adapter/ChapterListAdapter.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/adapter/ChapterListAdapter.java b/app/src/main/java/de/danoeh/antennapod/adapter/ChapterListAdapter.java index 67fb4c3b1..22c15949a 100644 --- a/app/src/main/java/de/danoeh/antennapod/adapter/ChapterListAdapter.java +++ b/app/src/main/java/de/danoeh/antennapod/adapter/ChapterListAdapter.java @@ -163,9 +163,11 @@ public class ChapterListAdapter extends ArrayAdapter<Chapter> { public int getCount() { // ignore invalid chapters int counter = 0; - for (Chapter chapter : chapters) { - if (!ignoreChapter(chapter)) { - counter++; + if (chapters != null) { + for (Chapter chapter : chapters) { + if (!ignoreChapter(chapter)) { + counter++; + } } } return counter; |