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

Make sure DiscoveryManager is not null when calling it

Solves #5413
This commit is contained in:
Martino Facchin 2016-10-03 11:07:10 +02:00
parent ec2e9a642a
commit 0a8e7a14f1

View File

@ -210,6 +210,9 @@ public class BaseNoGui {
} }
public static DiscoveryManager getDiscoveryManager() { public static DiscoveryManager getDiscoveryManager() {
if (discoveryManager == null) {
discoveryManager = new DiscoveryManager();
}
return discoveryManager; return discoveryManager;
} }
@ -633,8 +636,10 @@ public class BaseNoGui {
FileUtils.deleteIfExists(librariesIndexFile); FileUtils.deleteIfExists(librariesIndexFile);
} }
if (discoveryManager == null) {
discoveryManager = new DiscoveryManager(); discoveryManager = new DiscoveryManager();
} }
}
static protected void initPlatform() { static protected void initPlatform() {
try { try {