mirror of
https://github.com/arduino/Arduino.git
synced 2025-02-20 14:54:31 +01:00
avoid NPE if serial port gets discovered too early
This commit is contained in:
parent
7e17b5c318
commit
2a677b4bcd
@ -154,8 +154,10 @@ public class SerialUploader extends Uploader {
|
||||
}
|
||||
|
||||
BoardPort boardPort = BaseNoGui.getDiscoveryManager().find(PreferencesData.get("serial.port"));
|
||||
if (boardPort.getPrefs().get("iserial") != null) {
|
||||
try {
|
||||
prefs.put("serial.port.iserial", boardPort.getPrefs().get("iserial"));
|
||||
} catch (Exception e) {
|
||||
// if serial port does not contain an iserial field
|
||||
}
|
||||
|
||||
prefs.put("build.path", buildPath);
|
||||
|
Loading…
x
Reference in New Issue
Block a user