1
0
mirror of https://github.com/arduino/Arduino.git synced 2024-12-01 12:24:14 +01:00

Also SerialDiscovery was affected by bug found at 40535dfc55. Fixes #2892

This commit is contained in:
Federico Fissore 2015-04-13 13:38:55 +02:00
parent 40535dfc55
commit 350adb99cb
4 changed files with 7 additions and 0 deletions

View File

@ -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;

View File

@ -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);

View File

@ -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);
}

View File

@ -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);
}