chapterValid() now tests for empty chapter lists

This commit is contained in:
daniel oeh 2012-09-22 12:44:23 +02:00
parent 142f3cb9db
commit 27dd1df40a
1 changed files with 3 additions and 0 deletions

View File

@ -145,6 +145,9 @@ public class ChapterUtils {
} }
private static boolean chaptersValid(List<Chapter> chapters) { private static boolean chaptersValid(List<Chapter> chapters) {
if (chapters.isEmpty()) {
return false;
}
for (Chapter c : chapters) { for (Chapter c : chapters) {
if (c.getTitle() == null) { if (c.getTitle() == null) {
return false; return false;