]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
renderer may be null when called from the PDFTranscoder.
authorJeremias Maerki <jeremias@apache.org>
Fri, 2 Mar 2007 16:56:15 +0000 (16:56 +0000)
committerJeremias Maerki <jeremias@apache.org>
Fri, 2 Mar 2007 16:56:15 +0000 (16:56 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@513840 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/fop/fonts/FontSetup.java

index bd3e81d4f1321a08b9d94bddd963c9a88ab1a07c..9659398baeb318bbb0486ed01bd9904cfb16f996 100644 (file)
@@ -261,14 +261,16 @@ public class FontSetup {
             throws ConfigurationException {
         List fontList = new java.util.ArrayList();
                
-        FontResolver fontResolver = renderer.getFontResolver();
+        FontResolver fontResolver = (renderer != null ? renderer.getFontResolver() : null);
         if (fontResolver == null) {
             //Ensure that we have minimal font resolution capabilities
             fontResolver = FontSetup.createMinimalFontResolver();
         }
        
-        boolean strict
-            = renderer.getUserAgent().getFactory().validateUserConfigStrictly();
+        boolean strict = false;
+        if (renderer != null) {
+            strict = renderer.getUserAgent().getFactory().validateUserConfigStrictly();
+        }
         
         Configuration[] fonts = cfg.getChildren("fonts");
         for (int f = 0; f < fonts.length; f++) {