Skip to content

Commit 0a8e7a1

Browse files
committed
Make sure DiscoveryManager is not null when calling it
Solves #5413
1 parent ec2e9a6 commit 0a8e7a1

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

arduino-core/src/processing/app/BaseNoGui.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,9 @@ static public File getDefaultSketchbookFolder() {
210210
}
211211

212212
public static DiscoveryManager getDiscoveryManager() {
213+
if (discoveryManager == null) {
214+
discoveryManager = new DiscoveryManager();
215+
}
213216
return discoveryManager;
214217
}
215218

@@ -633,7 +636,9 @@ static public void initPackages() throws Exception {
633636
FileUtils.deleteIfExists(librariesIndexFile);
634637
}
635638

636-
discoveryManager = new DiscoveryManager();
639+
if (discoveryManager == null) {
640+
discoveryManager = new DiscoveryManager();
641+
}
637642
}
638643

639644
static protected void initPlatform() {

0 commit comments

Comments
 (0)