Merge pull request #1202 from TomHennen/chapter_npe
Resolves NullPointerException when dealing with chapters
This commit is contained in:
commit
7af9b9a0df
@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="de.danoeh.antennapod"
|
||||
android:versionCode="1030400"
|
||||
android:versionName="1.3.4.0">
|
||||
android:versionCode="1030401"
|
||||
android:versionName="1.3.4.1">
|
||||
<!--
|
||||
Version code schema:
|
||||
"1.2.3-SNAPSHOT" -> 1020300
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user