From b5fe1b1eb5442480c53f860ff4386655c82c5210 Mon Sep 17 00:00:00 2001 From: "David A. Mellis" Date: Wed, 11 Jun 2014 12:07:46 -0400 Subject: [PATCH] Proceed with upload even if port can't be found. (Issue #1791) --- app/src/cc/arduino/packages/UploaderAndMonitorFactory.java | 2 +- app/src/processing/app/Sketch.java | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/app/src/cc/arduino/packages/UploaderAndMonitorFactory.java b/app/src/cc/arduino/packages/UploaderAndMonitorFactory.java index 30761ed78..ba6e9d54e 100644 --- a/app/src/cc/arduino/packages/UploaderAndMonitorFactory.java +++ b/app/src/cc/arduino/packages/UploaderAndMonitorFactory.java @@ -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); } diff --git a/app/src/processing/app/Sketch.java b/app/src/processing/app/Sketch.java index 11a63cae7..8cd95d7c4 100644 --- a/app/src/processing/app/Sketch.java +++ b/app/src/processing/app/Sketch.java @@ -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;