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"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="de.danoeh.antennapod"
|
package="de.danoeh.antennapod"
|
||||||
android:versionCode="1030400"
|
android:versionCode="1030401"
|
||||||
android:versionName="1.3.4.0">
|
android:versionName="1.3.4.1">
|
||||||
<!--
|
<!--
|
||||||
Version code schema:
|
Version code schema:
|
||||||
"1.2.3-SNAPSHOT" -> 1020300
|
"1.2.3-SNAPSHOT" -> 1020300
|
||||||
|
|
|
@ -163,9 +163,11 @@ public class ChapterListAdapter extends ArrayAdapter<Chapter> {
|
||||||
public int getCount() {
|
public int getCount() {
|
||||||
// ignore invalid chapters
|
// ignore invalid chapters
|
||||||
int counter = 0;
|
int counter = 0;
|
||||||
for (Chapter chapter : chapters) {
|
if (chapters != null) {
|
||||||
if (!ignoreChapter(chapter)) {
|
for (Chapter chapter : chapters) {
|
||||||
counter++;
|
if (!ignoreChapter(chapter)) {
|
||||||
|
counter++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return counter;
|
return counter;
|
||||||
|
|
Loading…
Reference in New Issue