git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@198689
13f79535-47bb-0310-9956-
ffa450edef68
break;
}
} else if (el.isGlue()) {
- KnuthElement prev = (KnuthElement)elementLists[i].get(end[i] - 1);
- if (prev.isBox()) {
- //Second legal break point
- break;
+ if (end[i] > 0) {
+ KnuthElement prev = (KnuthElement)elementLists[i].get(end[i] - 1);
+ if (prev.isBox()) {
+ //Second legal break point
+ break;
+ }
}
partialHeights[i] += el.getW();
} else {
break;
}
} else if (el.isGlue()) {
- KnuthElement prev = (KnuthElement)elementLists[i].get(end[i] - 1);
- if (prev.isBox()) {
- //Second legal break point
- break;
+ if (end[i] > 0) {
+ KnuthElement prev = (KnuthElement)elementLists[i].get(end[i] - 1);
+ if (prev.isBox()) {
+ //Second legal break point
+ break;
+ }
}
widths[i] += el.getW();
} else {