]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Fix a couple of NPE
authorKaren Lease <klease@apache.org>
Fri, 9 Nov 2001 23:03:54 +0000 (23:03 +0000)
committerKaren Lease <klease@apache.org>
Fri, 9 Nov 2001 23:03:54 +0000 (23:03 +0000)
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
src/org/apache/fop/layoutmgr/PageLayoutManager.java

index d09ca9c4d7f4ab6030e56a7e3489938a9a6f0a10..696e5bd6590ec60dd096256f3ef713d754ed2ae8 100644 (file)
@@ -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();
            }
        }
index a38c5d3d93bef74b39add9aace42f8c85c841ba0..0ca1a8fe00c629bf7f8f17dcfc532a8f2ef43447 100644 (file)
@@ -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);
        }