diff options
author | Jeremias Maerki <jeremias@apache.org> | 2008-03-31 08:39:49 +0000 |
---|---|---|
committer | Jeremias Maerki <jeremias@apache.org> | 2008-03-31 08:39:49 +0000 |
commit | 3e8128c8d05a7f08258913a81a438d0666bdf220 (patch) | |
tree | 156a654167d22db426a6caf61cbe4bcc54c073e1 | |
parent | f1e20bb4e5ed277795329e5b05cf1f2485b9387a (diff) | |
download | xmlgraphics-fop-3e8128c8d05a7f08258913a81a438d0666bdf220.tar.gz xmlgraphics-fop-3e8128c8d05a7f08258913a81a438d0666bdf220.zip |
Fixed possible NullPointerException in AFM kerning table build code.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@642923 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | src/java/org/apache/fop/fonts/type1/AFMFile.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/java/org/apache/fop/fonts/type1/AFMFile.java b/src/java/org/apache/fop/fonts/type1/AFMFile.java index 6a1973843..3cb4b3343 100644 --- a/src/java/org/apache/fop/fonts/type1/AFMFile.java +++ b/src/java/org/apache/fop/fonts/type1/AFMFile.java @@ -413,7 +413,7 @@ public class AFMFile { Map.Entry entryFrom = (Map.Entry)iterFrom.next(); String name1 = (String)entryFrom.getKey(); AFMCharMetrics chm1 = getChar(name1); - if (!chm1.hasCharCode()) { + if (chm1 == null || !chm1.hasCharCode()) { continue; } Map container = null; @@ -423,7 +423,7 @@ public class AFMFile { Map.Entry entryTo = (Map.Entry)iterTo.next(); String name2 = (String)entryTo.getKey(); AFMCharMetrics chm2 = getChar(name2); - if (!chm2.hasCharCode()) { + if (chm2 == null || !chm2.hasCharCode()) { continue; } if (container == null) { |