pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1854792 - /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/state/PDExtendedGraphicsState.java
Date Mon, 04 Mar 2019 18:53:31 GMT
Author: tilman
Date: Mon Mar  4 18:53:31 2019
New Revision: 1854792

URL: http://svn.apache.org/viewvc?rev=1854792&view=rev
Log:
PDFBOX-4071: avoid warning if entry is null

Modified:
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/state/PDExtendedGraphicsState.java

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/state/PDExtendedGraphicsState.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/state/PDExtendedGraphicsState.java?rev=1854792&r1=1854791&r2=1854792&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/state/PDExtendedGraphicsState.java
(original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/state/PDExtendedGraphicsState.java
Mon Mar  4 18:53:31 2019
@@ -575,10 +575,14 @@ public class PDExtendedGraphicsState imp
     /**
      * Returns the soft mask stored in the COS dictionary
      *
-     * @return the soft mask
+     * @return the soft mask or null if their isn't any.
      */
     public PDSoftMask getSoftMask()
     {
+        if (!dict.containsKey(COSName.SMASK))
+        {
+            return null;
+        }
         return PDSoftMask.create(dict.getDictionaryObject(COSName.SMASK));
     }
 



Mime
View raw message