From 938811aa9177e819fe5f51f6e14476559e847b69 Mon Sep 17 00:00:00 2001 From: Finn Bock Date: Thu, 29 Jan 2004 13:32:04 +0000 Subject: [PATCH] Fix a NPE when the last shorthand was not detected. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@197289 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/fop/fo/Property.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/java/org/apache/fop/fo/Property.java b/src/java/org/apache/fop/fo/Property.java index 41a017b75..c9f126f96 100644 --- a/src/java/org/apache/fop/fo/Property.java +++ b/src/java/org/apache/fop/fo/Property.java @@ -618,7 +618,7 @@ public class Property { } ListProperty listprop; int n = shorthands.length; - for (int i = 0; i < n; i++) { + for (int i = 0; i < n && shorthands[i] != null; i++) { Property.Maker shorthand = shorthands[i]; listprop = (ListProperty)propertyList.getExplicit(shorthand.propId); if (listprop != null) { -- 2.39.5