From: Keiron Liddle Date: Tue, 23 Jul 2002 11:01:59 +0000 (+0000) Subject: fix for unknown child that returns null size X-Git-Tag: Alt-Design-integration-base~492 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=7f263c27804a4882f33f5a423150d5cc52448361;p=xmlgraphics-fop.git fix for unknown child that returns null size git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@195023 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/org/apache/fop/fo/flow/InstreamForeignObject.java b/src/org/apache/fop/fo/flow/InstreamForeignObject.java index ec0e914a3..6657524ec 100644 --- a/src/org/apache/fop/fo/flow/InstreamForeignObject.java +++ b/src/org/apache/fop/fo/flow/InstreamForeignObject.java @@ -161,6 +161,10 @@ public class InstreamForeignObject extends FObj { Point2D csize = new Point2D.Float(cwidth == -1 ? -1 : cwidth / 1000f, cheight == -1 ? -1 : cheight / 1000f); Point2D size = child.getDimension(csize); + if(size == null) { + // error + return null; + } if(cwidth == -1) { cwidth = (int)size.getX() * 1000; }