diff --git a/src/main/java/diff/rednaga/AXMLPrinter.java b/src/main/java/diff/rednaga/AXMLPrinter.java index eeb020d..156deb4 100644 --- a/src/main/java/diff/rednaga/AXMLPrinter.java +++ b/src/main/java/diff/rednaga/AXMLPrinter.java @@ -78,8 +78,13 @@ public static void main(String[] arguments) throws IOException { } catch (Exception e) { e.printStackTrace(); } finally { - fileInputStream.close(); - fileOutputStream.close(); + if (fileInputStream != null) { + fileInputStream.close(); + } + + if (fileOutputStream != null) { + fileOutputStream.close(); + } } }