diff --git a/arduino-core/src/cc/arduino/contributions/packages/ContributionsIndexer.java b/arduino-core/src/cc/arduino/contributions/packages/ContributionsIndexer.java index a1ca10929..35a53e906 100644 --- a/arduino-core/src/cc/arduino/contributions/packages/ContributionsIndexer.java +++ b/arduino-core/src/cc/arduino/contributions/packages/ContributionsIndexer.java @@ -215,7 +215,7 @@ public class ContributionsIndexer { } private void syncBuiltInHardware() throws IOException { - if (index == null) { + if (index == null || builtInHardwareFolder == null) { return; } for (File folder : builtInHardwareFolder.listFiles(ONLY_DIRS)) { diff --git a/arduino-core/src/processing/app/BaseNoGui.java b/arduino-core/src/processing/app/BaseNoGui.java index 920d0e068..37d4b33e9 100644 --- a/arduino-core/src/processing/app/BaseNoGui.java +++ b/arduino-core/src/processing/app/BaseNoGui.java @@ -676,7 +676,9 @@ public class BaseNoGui { // Libraries located in the latest folders on the list can override // other libraries with the same name. librariesIndexer.setLibrariesFolders(librariesFolders); - librariesIndexer.setArchitecturePriority(getTargetPlatform().getId()); + if (getTargetPlatform() != null) { + librariesIndexer.setArchitecturePriority(getTargetPlatform().getId()); + } librariesIndexer.rescanLibraries(); populateImportToLibraryTable();