From 9a9cc2318e78c79a0ddb9dbeeb56f2bd85b10dde Mon Sep 17 00:00:00 2001 From: Glen Mazza Date: Sun, 28 Dec 2003 16:13:10 +0000 Subject: [PATCH] Minor patch for fixing NPE error when Locator not available--submitted by Finn Bock. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@197071 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/fop/fo/FObj.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/java/org/apache/fop/fo/FObj.java b/src/java/org/apache/fop/fo/FObj.java index d2aab998d..172c5bf99 100644 --- a/src/java/org/apache/fop/fo/FObj.java +++ b/src/java/org/apache/fop/fo/FObj.java @@ -132,9 +132,11 @@ public class FObj extends FONode implements Constants { } public void setLocation(Locator locator) { - line = locator.getLineNumber(); - column = locator.getColumnNumber(); - systemId = locator.getSystemId(); + if (locator != null) { + line = locator.getLineNumber(); + column = locator.getColumnNumber(); + systemId = locator.getSystemId(); + } } /** -- 2.39.5