From 00921a81aa583dfca32a90d7d52fd45ab2ce161d Mon Sep 17 00:00:00 2001 From: Karen Lease Date: Fri, 9 Nov 2001 23:03:54 +0000 Subject: [PATCH] Fix a couple of NPE git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@194553 13f79535-47bb-0310-9956-ffa450edef68 --- src/org/apache/fop/layoutmgr/AbstractLayoutManager.java | 2 +- src/org/apache/fop/layoutmgr/PageLayoutManager.java | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) 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); } -- 2.39.5