Skip to content

Commit 2893c2d

Browse files
Me No Devcmaglie
Me No Dev
authored andcommitted
Fix adding NULL value to the preferences when iserial is not defined
1 parent 19a9e4d commit 2893c2d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arduino-core/src/cc/arduino/packages/uploaders/SerialUploader.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ public boolean uploadUsingPreferences(File sourcePath, String buildPath, String
155155

156156
BoardPort boardPort = BaseNoGui.getDiscoveryManager().find(PreferencesData.get("serial.port"));
157157
try {
158-
prefs.put("serial.port.iserial", boardPort.getPrefs().get("iserial"));
158+
prefs.put("serial.port.iserial", boardPort.getPrefs().getOrExcept("iserial"));
159159
} catch (Exception e) {
160160
// if serial port does not contain an iserial field
161161
}

0 commit comments

Comments
 (0)