mirror of
https://github.com/arduino/Arduino.git
synced 2024-11-29 10:24:12 +01:00
Also SerialDiscovery was affected by bug found at 40535dfc55
. Fixes #2892
This commit is contained in:
parent
40535dfc55
commit
350adb99cb
@ -55,6 +55,10 @@ public class SerialBoardsLister extends TimerTask {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
if (BaseNoGui.packages == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
Platform platform = BaseNoGui.getPlatform();
|
||||
if (platform == null) {
|
||||
return;
|
||||
|
@ -122,6 +122,7 @@ public class Platform extends processing.app.Platform {
|
||||
|
||||
@Override
|
||||
public Map<String, Object> resolveDeviceAttachedTo(String serial, Map<String, TargetPackage> packages, String devicesListOutput) {
|
||||
assert packages != null;
|
||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||
Executor executor = new CollectStdOutExecutor(baos);
|
||||
|
||||
|
@ -191,6 +191,7 @@ public class Platform extends processing.app.Platform {
|
||||
|
||||
@Override
|
||||
public Map<String, Object> resolveDeviceAttachedTo(String serial, Map<String, TargetPackage> packages, String devicesListOutput) {
|
||||
assert packages != null;
|
||||
if (devicesListOutput == null) {
|
||||
return super.resolveDeviceAttachedTo(serial, packages, devicesListOutput);
|
||||
}
|
||||
|
@ -286,6 +286,7 @@ public class Platform extends processing.app.Platform {
|
||||
|
||||
@Override
|
||||
public Map<String, Object> resolveDeviceAttachedTo(String serial, Map<String, TargetPackage> packages, String devicesListOutput) {
|
||||
assert packages != null;
|
||||
if (devicesListOutput == null) {
|
||||
return super.resolveDeviceAttachedTo(serial, packages, devicesListOutput);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user