aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/org/apache/fop/layoutmgr/AbstractLayoutManager.java2
-rw-r--r--src/org/apache/fop/layoutmgr/PageLayoutManager.java1
2 files changed, 2 insertions, 1 deletions
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);
}