diff options
Diffstat (limited to 'src/java/org/apache/fop/layoutmgr/SpaceResolver.java')
-rw-r--r-- | src/java/org/apache/fop/layoutmgr/SpaceResolver.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/java/org/apache/fop/layoutmgr/SpaceResolver.java b/src/java/org/apache/fop/layoutmgr/SpaceResolver.java index 31bdaebbf..551e7d3f2 100644 --- a/src/java/org/apache/fop/layoutmgr/SpaceResolver.java +++ b/src/java/org/apache/fop/layoutmgr/SpaceResolver.java @@ -696,7 +696,7 @@ public final class SpaceResolver { beforeBreak.notifyBreakSituation(true, RelSide.BEFORE); } } - el = (KnuthElement)effectiveList.get(endElementIndex); + el = endElementIndex > -1 ? (KnuthElement) effectiveList.get(endElementIndex) : null; if (el != null && el.isPenalty()) { Position pos = el.getPosition(); if (pos instanceof SpaceResolver.SpaceHandlingBreakPosition) { |