1
0
mirror of https://github.com/arduino/Arduino.git synced 2024-11-28 09:24:14 +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,7 +636,9 @@ public class BaseNoGui {
FileUtils.deleteIfExists(librariesIndexFile); FileUtils.deleteIfExists(librariesIndexFile);
} }
discoveryManager = new DiscoveryManager(); if (discoveryManager == null) {
discoveryManager = new DiscoveryManager();
}
} }
static protected void initPlatform() { static protected void initPlatform() {