X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=ao-tools%2Faltosui%2FAltosFlash.java;h=3af25c23457b696529ea8a2eb19fc1a8bb06278a;hb=84cd5d42d8b5659463544fe2a400758b56478609;hp=fa2465d337748a0af7ee0fd79dcdd0c80d5e8552;hpb=939be6793238a275b7682ecc376fed14379cf044;p=fw%2Faltos diff --git a/ao-tools/altosui/AltosFlash.java b/ao-tools/altosui/AltosFlash.java index fa2465d3..3af25c23 100644 --- a/ao-tools/altosui/AltosFlash.java +++ b/ao-tools/altosui/AltosFlash.java @@ -336,7 +336,9 @@ public class AltosFlash { debug = new AltosDebug(in_debug_dongle); input = new FileInputStream(file); image = new AltosHexfile(input); - if (!debug.check_connection()) + if (!debug.check_connection()) { + debug.close(); throw new IOException("Debug port not connected"); + } } } \ No newline at end of file