projects
/
fw
/
altos
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
055f323
)
altosui: Allow AltosConfig to abort before serial line starts
author
Keith Packard
<keithp@keithp.com>
Thu, 25 Oct 2012 06:55:45 +0000
(23:55 -0700)
committer
Keith Packard
<keithp@keithp.com>
Thu, 25 Oct 2012 07:07:14 +0000
(
00:07
-0700)
Check to see if the serial line is active before trying to close it.
Signed-off-by: Keith Packard <keithp@keithp.com>
altosui/AltosConfig.java
patch
|
blob
|
history
diff --git
a/altosui/AltosConfig.java
b/altosui/AltosConfig.java
index 44c6239af278821f0d229bd29e5d4eb2cdddb17b..4b0edec0fbf5492aa48501c5e9ab2540f121d65c 100644
(file)
--- a/
altosui/AltosConfig.java
+++ b/
altosui/AltosConfig.java
@@
-393,8
+393,10
@@
public class AltosConfig implements ActionListener {
}
void abort() {
- serial_line.close();
- serial_line = null;
+ if (serial_line != null) {
+ serial_line.close();
+ serial_line = null;
+ }
JOptionPane.showMessageDialog(owner,
String.format("Connection to \"%s\" failed",
device.toShortString()),