pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From le...@apache.org
Subject svn commit: r1603854 - /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/PDFont.java
Date Thu, 19 Jun 2014 12:13:31 GMT
Author: lehmi
Date: Thu Jun 19 12:13:30 2014
New Revision: 1603854

URL: http://svn.apache.org/r1603854
Log:
PDFBOX-2149: avoid, NPE, as not all fonts have a font descriptor

Modified:
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/PDFont.java

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/PDFont.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/PDFont.java?rev=1603854&r1=1603853&r2=1603854&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/PDFont.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/PDFont.java Thu Jun 19
12:13:30 2014
@@ -691,7 +691,12 @@ public abstract class PDFont implements 
      */
     public boolean isSymbolicFont()
     {
-        return getFontDescriptor().isSymbolic();
+        // not all fonts have a font descriptor
+        if (getFontDescriptor() != null)
+        {
+            return getFontDescriptor().isSymbolic();
+        }
+        return false;
     }
 
     /**



Mime
View raw message