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