pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1783540 - /pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/image/PDInlineImage.java
Date Sat, 18 Feb 2017 13:36:14 GMT
Author: tilman
Date: Sat Feb 18 13:36:14 2017
New Revision: 1783540

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

Modified:
    pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/image/PDInlineImage.java

Modified: pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/image/PDInlineImage.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/image/PDInlineImage.java?rev=1783540&r1=1783539&r2=1783540&view=diff
==============================================================================
--- pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/image/PDInlineImage.java
(original)
+++ pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/image/PDInlineImage.java
Sat Feb 18 13:36:14 2017
@@ -302,7 +302,7 @@ public final class PDInlineImage impleme
         List<String> filters = getFilters();
         ByteArrayInputStream in = new ByteArrayInputStream(rawData);
         ByteArrayOutputStream out = new ByteArrayOutputStream(rawData.length);
-        for (int i = 0; i < filters.size(); i++)
+        for (int i = 0; filters != null && i < filters.size(); i++)
         {
             // TODO handling of abbreviated names belongs here, rather than in other classes
             out.reset();



Mime
View raw message