Proceed with upload even if port can't be found. (Issue #1791)

This commit is contained in:
David A. Mellis 2014-06-11 12:07:46 -04:00
parent c387f87329
commit b5fe1b1eb5
2 changed files with 1 additions and 6 deletions

View File

@ -40,7 +40,7 @@ import processing.app.debug.TargetBoard;
public class UploaderAndMonitorFactory {
public Uploader newUploader(TargetBoard board, BoardPort port) {
if ("true".equals(board.getPreferences().get("upload.via_ssh")) && "network".equals(port.getProtocol())) {
if ("true".equals(board.getPreferences().get("upload.via_ssh")) && port != null && "network".equals(port.getProtocol())) {
return new SSHUploader(port);
}

View File

@ -1692,11 +1692,6 @@ public class Sketch {
BoardPort boardPort = Base.getDiscoveryManager().find(Preferences.get("serial.port"));
if (boardPort == null) {
editor.statusError(I18n.format("Board at {0} is not available", Preferences.get("serial.port")));
return false;
}
Uploader uploader = new UploaderAndMonitorFactory().newUploader(target.getBoards().get(board), boardPort);
boolean success = false;