From: Karen Lease Date: Fri, 9 Nov 2001 23:03:54 +0000 (+0000) Subject: Fix a couple of NPE X-Git-Tag: fop-0_20_4-doc~210 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=00921a81aa583dfca32a90d7d52fd45ab2ce161d;p=xmlgraphics-fop.git Fix a couple of NPE git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@194553 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/org/apache/fop/layoutmgr/AbstractLayoutManager.java b/src/org/apache/fop/layoutmgr/AbstractLayoutManager.java index d09ca9c4d..696e5bd65 100644 --- a/src/org/apache/fop/layoutmgr/AbstractLayoutManager.java +++ b/src/org/apache/fop/layoutmgr/AbstractLayoutManager.java @@ -39,8 +39,8 @@ public abstract class AbstractLayoutManager implements LayoutManager { Iterator children = fobj.getChildren(); while (children.hasNext()) { LayoutManager lm = ((FObj)children.next()).getLayoutManager(); - lm.setParentLM(this); if (lm != null) { + lm.setParentLM(this); lm.generateAreas(); } } diff --git a/src/org/apache/fop/layoutmgr/PageLayoutManager.java b/src/org/apache/fop/layoutmgr/PageLayoutManager.java index a38c5d3d9..0ca1a8fe0 100644 --- a/src/org/apache/fop/layoutmgr/PageLayoutManager.java +++ b/src/org/apache/fop/layoutmgr/PageLayoutManager.java @@ -72,6 +72,7 @@ public class PageLayoutManager extends AbstractLayoutManager * For now, only handle normal flow areas. */ public void addChild(Area childArea) { + if (childArea ==null) return; if (childArea.getAreaClass() == Area.CLASS_NORMAL) { placeFlowRefArea(childArea); }