Merge pull request #1202 from TomHennen/chapter_npe

Resolves NullPointerException when dealing with chapters
This commit is contained in:
Tom Hennen 2015-09-13 20:10:03 -04:00
commit 7af9b9a0df
2 changed files with 7 additions and 5 deletions

View File

@ -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

View File

@ -163,11 +163,13 @@ public class ChapterListAdapter extends ArrayAdapter<Chapter> {
public int getCount() {
// ignore invalid chapters
int counter = 0;
if (chapters != null) {
for (Chapter chapter : chapters) {
if (!ignoreChapter(chapter)) {
counter++;
}
}
}
return counter;
}