mirror of
https://github.com/arduino/Arduino.git
synced 2025-01-29 18:52:13 +01:00
Mitigates #3074 by avoiding NPE. Making the IDE work with system toolchains remains to be fixed
This commit is contained in:
parent
724df07fb8
commit
875a775e93
@ -775,9 +775,11 @@ public class BaseNoGui {
|
||||
PreferencesData.removeAllKeysWithPrefix(prefix);
|
||||
|
||||
for (ContributedTool tool : indexer.getInstalledTools()) {
|
||||
String path = tool.getDownloadableContribution().getInstalledFolder().getAbsolutePath();
|
||||
PreferencesData.set(prefix + tool.getName() + ".path", path);
|
||||
PreferencesData.set(prefix + tool.getName() + "-" + tool.getVersion() + ".path", path);
|
||||
File installedFolder = tool.getDownloadableContribution().getInstalledFolder();
|
||||
if (installedFolder != null) {
|
||||
PreferencesData.set(prefix + tool.getName() + ".path", installedFolder.getAbsolutePath());
|
||||
PreferencesData.set(prefix + tool.getName() + "-" + tool.getVersion() + ".path", installedFolder.getAbsolutePath());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user