pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1773912 - /pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java
Date Tue, 13 Dec 2016 00:40:18 GMT
Author: tilman
Date: Tue Dec 13 00:40:18 2016
New Revision: 1773912

URL: http://svn.apache.org/viewvc?rev=1773912&view=rev
Log:
PDFBOX-2852: avoid NPE

Modified:
    pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java

Modified: pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java?rev=1773912&r1=1773911&r2=1773912&view=diff
==============================================================================
--- pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java (original)
+++ pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java Tue
Dec 13 00:40:18 2016
@@ -925,6 +925,11 @@ public class PageDrawer extends PDFGraph
     public void shadingFill(COSName shadingName) throws IOException
     {
         PDShading shading = getResources().getShading(shadingName);
+        if (shading == null)
+        {
+            LOG.error("shading " + shadingName + " does not exist in resources dictionary");
+            return;
+        }
         Matrix ctm = getGraphicsState().getCurrentTransformationMatrix();
         Paint paint = shading.toPaint(ctm);
 



Mime
View raw message