1
0
mirror of https://github.com/arduino/Arduino.git synced 2025-03-13 10:29:35 +01:00

Fix adding NULL value to the preferences when iserial is not defined

This commit is contained in:
Me No Dev 2016-01-23 14:06:22 +02:00 committed by Cristian Maglie
parent 19a9e4d5e0
commit 2893c2d643

View File

@ -155,7 +155,7 @@ public class SerialUploader extends Uploader {
BoardPort boardPort = BaseNoGui.getDiscoveryManager().find(PreferencesData.get("serial.port"));
try {
prefs.put("serial.port.iserial", boardPort.getPrefs().get("iserial"));
prefs.put("serial.port.iserial", boardPort.getPrefs().getOrExcept("iserial"));
} catch (Exception e) {
// if serial port does not contain an iserial field
}