From: Simon Steiner Date: Tue, 12 Oct 2021 13:51:54 +0000 (+0000) Subject: FOP-2943: NPE when inline character is a white space X-Git-Tag: fop-2_7~21 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=b8f16c486a5cced199c2728edb6712f3aa3838db;p=xmlgraphics-fop.git FOP-2943: NPE when inline character is a white space Thanks to J Frank git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1894164 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/fop-core/src/main/java/org/apache/fop/fo/FObj.java b/fop-core/src/main/java/org/apache/fop/fo/FObj.java index d938eded0..0f6acb871 100644 --- a/fop-core/src/main/java/org/apache/fop/fo/FObj.java +++ b/fop-core/src/main/java/org/apache/fop/fo/FObj.java @@ -314,7 +314,7 @@ public abstract class FObj extends FONode implements Constants { } if (child == lastChild) { if (child.siblings != null) { - lastChild = siblings[0]; + lastChild = child.siblings[0]; } else { lastChild = null; } diff --git a/fop/test/layoutengine/standard-testcases/block-inline-empty-character.xml b/fop/test/layoutengine/standard-testcases/block-inline-empty-character.xml new file mode 100644 index 000000000..e39ec09a8 --- /dev/null +++ b/fop/test/layoutengine/standard-testcases/block-inline-empty-character.xml @@ -0,0 +1,45 @@ + + + + + +

This test checks empty character inside inline.

+
+ + + + + + + + + + block1 + block2 + + + + + + + + + + +