# This patch file was generated by NetBeans IDE
# It uses platform neutral UTF-8 encoding and \n newlines.
--- Remotely Modified (Based On HEAD)
+++ Locally Modified (Based On LOCAL)
@@ -351,7 +351,6 @@
             Iterator<ImageReader> readers = ImageIO.getImageReaders(input);
             if (readers == null || !readers.hasNext()) 
             {
-                input.close();
                 throw new RuntimeException("No ImageReaders found");
             }
             reader = (ImageReader) readers.next();
@@ -388,6 +387,16 @@
         }
         finally
         {
+            if (input != null)
+            {
+                try
+                {
+                    input.close();
+                }
+                catch (IOException exception)
+                {
+                }
+            }
             if (reader != null)
             {
                 reader.dispose();
