diff --git a/inception/inception-recommendation/src/main/java/de/tudarmstadt/ukp/inception/recommendation/util/OverlapIterator.java b/inception/inception-recommendation/src/main/java/de/tudarmstadt/ukp/inception/recommendation/util/OverlapIterator.java index 4f685518e89..efc738f4982 100644 --- a/inception/inception-recommendation/src/main/java/de/tudarmstadt/ukp/inception/recommendation/util/OverlapIterator.java +++ b/inception/inception-recommendation/src/main/java/de/tudarmstadt/ukp/inception/recommendation/util/OverlapIterator.java @@ -91,7 +91,7 @@ else if (ib.hasNext()) { // Step to the next B from the source list LOG.trace("Stepping B from source Bs"); b = ib.next(); - if (b.getBegin() > a.getEnd()) { + if (a != null && b.getBegin() > a.getEnd()) { // All remaining b's are beyond the end of the a's and won't overlap a = null; }