diff options
| author | Bdale Garbee <bdale@gag.com> | 2014-09-06 13:41:36 -0600 | 
|---|---|---|
| committer | Bdale Garbee <bdale@gag.com> | 2014-09-06 13:41:36 -0600 | 
| commit | 8c212cd5bfa03f71a31d84bd0051314e77d88461 (patch) | |
| tree | 5be036b3510b8b474ad829caea20fcbc75b56839 /altosui/AltosConfigTD.java | |
| parent | e9714e34091abe657aa1b30aeda9466331aa39c1 (diff) | |
| parent | dd26ec2e706bdd29090759deeb90090a0e3b74f0 (diff) | |
Merge branch 'master' of ssh://git.gag.com/scm/git/fw/altos
Conflicts:
	ao-bringup/turnon_telemega
Diffstat (limited to 'altosui/AltosConfigTD.java')
| -rw-r--r-- | altosui/AltosConfigTD.java | 12 | 
1 files changed, 8 insertions, 4 deletions
diff --git a/altosui/AltosConfigTD.java b/altosui/AltosConfigTD.java index 4389e49b..9020ed9d 100644 --- a/altosui/AltosConfigTD.java +++ b/altosui/AltosConfigTD.java @@ -223,8 +223,10 @@ public class AltosConfigTD implements ActionListener {  					if (!config_version.get().equals("0.0"))  						break;  					been_there = true; -					config.serial_line.printf("C\n "); -					config.serial_line.flush_input(); +					if (config != null && config.serial_line != null) { +						config.serial_line.printf("C\n "); +						config.serial_line.flush_input(); +					}  				}  			} catch (InterruptedException ie) {  			} @@ -277,8 +279,10 @@ public class AltosConfigTD 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()),  | 
