From: Finn Bock Date: Tue, 14 Sep 2004 09:52:58 +0000 (+0000) Subject: Fix a NPE in the interaction between PageLM.needNewPage() and X-Git-Tag: Root_Temp_KnuthStylePageBreaking~545 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=af51943fcae8f639dabfc3ada3bafaf62bab3ec1;p=xmlgraphics-fop.git Fix a NPE in the interaction between PageLM.needNewPage() and PageLM.needEmptyPage(). Testcase in examples/fo/basic/extensive.fo. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@197950 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/java/org/apache/fop/area/BodyRegion.java b/src/java/org/apache/fop/area/BodyRegion.java index c1c812aa5..61484e2ce 100644 --- a/src/java/org/apache/fop/area/BodyRegion.java +++ b/src/java/org/apache/fop/area/BodyRegion.java @@ -122,7 +122,7 @@ public class BodyRegion extends RegionReference { * @return whether the main reference area has any child areas added to it */ public boolean isEmpty() { - return mainReference.isEmpty(); + return mainReference == null || mainReference.isEmpty(); }