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

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

Modified:
    
pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDPageContentStream.java

Modified: 
pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDPageContentStream.java
URL: 
http://svn.apache.org/viewvc/pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDPageContentStream.java?rev=1823691&r1=1823690&r2=1823691&view=diff
==============================================================================
--- 
pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDPageContentStream.java
 (original)
+++ 
pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDPageContentStream.java
 Fri Feb  9 19:11:14 2018
@@ -2481,7 +2481,11 @@ public final class PDPageContentStream i
     @Override
     public void close() throws IOException
     {
-        output.close();
+        if (output != null)
+        {
+            output.close();
+            output = null;
+        }
     }
 
     private boolean isOutside255Interval(int val)


Reply via email to