Author: tilman
Date: Fri Feb  9 19:11:19 2018
New Revision: 1823692

URL: http://svn.apache.org/viewvc?rev=1823692&view=rev
Log:
PDFBOX-4071: calling close() twice should have no effect

Modified:
    
pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDAbstractContentStream.java

Modified: 
pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDAbstractContentStream.java
URL: 
http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDAbstractContentStream.java?rev=1823692&r1=1823691&r2=1823692&view=diff
==============================================================================
--- 
pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDAbstractContentStream.java
 (original)
+++ 
pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDAbstractContentStream.java
 Fri Feb  9 19:11:19 2018
@@ -1486,7 +1486,11 @@ public abstract class PDAbstractContentS
     @Override
     public void close() throws IOException
     {
-        outputStream.close();
+        if (outputStream != null)
+        {
+            outputStream.close();
+            outputStream = null;
+        }
     }
 
     protected boolean isOutside255Interval(int val)


Reply via email to