]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Fix a NPE when the last shorthand was not detected.
authorFinn Bock <bckfnn@apache.org>
Thu, 29 Jan 2004 13:32:04 +0000 (13:32 +0000)
committerFinn Bock <bckfnn@apache.org>
Thu, 29 Jan 2004 13:32:04 +0000 (13:32 +0000)
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

index 41a017b7586b8554e72cfaafda84ba3ec16a02fe..c9f126f96c47b8a6927752c1c9de617b1f0e65fb 100644 (file)
@@ -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) {