From 7f263c27804a4882f33f5a423150d5cc52448361 Mon Sep 17 00:00:00 2001 From: Keiron Liddle Date: Tue, 23 Jul 2002 11:01:59 +0000 Subject: [PATCH] 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 --- src/org/apache/fop/fo/flow/InstreamForeignObject.java | 4 ++++ 1 file changed, 4 insertions(+) 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; } -- 2.39.5