diff options
author | Jeremias Maerki <jeremias@apache.org> | 2006-06-27 18:17:11 +0000 |
---|---|---|
committer | Jeremias Maerki <jeremias@apache.org> | 2006-06-27 18:17:11 +0000 |
commit | 2ddb278b909d86bc7f977f154585611a8469198c (patch) | |
tree | cbc7f6bea9d1ed1833880dbd0701dbf59a09f0c1 /src/java/org/apache | |
parent | ffc6c6da3f8334083ba3b03e339cf581b7f6babf (diff) | |
download | xmlgraphics-fop-2ddb278b909d86bc7f977f154585611a8469198c.tar.gz xmlgraphics-fop-2ddb278b909d86bc7f977f154585611a8469198c.zip |
Fix NPE if there's no ElementMapping for a particular namespace.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@417543 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache')
-rw-r--r-- | src/java/org/apache/fop/fo/ElementMappingRegistry.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/java/org/apache/fop/fo/ElementMappingRegistry.java b/src/java/org/apache/fop/fo/ElementMappingRegistry.java index 9bb0ab19b..2609b902d 100644 --- a/src/java/org/apache/fop/fo/ElementMappingRegistry.java +++ b/src/java/org/apache/fop/fo/ElementMappingRegistry.java @@ -160,7 +160,11 @@ public class ElementMappingRegistry { */ public DOMImplementation getDOMImplementationForNamespace(String namespaceURI) { ElementMapping mapping = (ElementMapping)this.namespaces.get(namespaceURI); - return mapping.getDOMImplementation(); + if (mapping == null) { + return null; + } else { + return mapping.getDOMImplementation(); + } } /** |