Skip to content

Commit 230d130

Browse files
author
jantje
committed
#1339 cater for platform not found
Now needed as there was no platform but only platform version
1 parent 658fbc3 commit 230d130

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

io.sloeber.core/src/io/sloeber/core/api/LibraryManager.java

+9-7
Original file line numberDiff line numberDiff line change
@@ -93,14 +93,16 @@ public static void InstallDefaultLibraries(IProgressMonitor monitor) {
9393

9494
for (String libraryName : Defaults.DEFAULT_INSTALLED_LIBRARIES) {
9595
ArduinoLibrary toInstalLib = libindex.getLibrary(libraryName);
96-
ArduinoLibraryVersion toInstalLibVersion = toInstalLib.getNewestVersion();
97-
ArduinoLibraryVersion instaledLibVersion = toInstalLib.getInstalledVersion();
98-
if (toInstalLibVersion != null) {
99-
if (toInstalLibVersion != instaledLibVersion) {
100-
if (instaledLibVersion != null) {
101-
unInstall(instaledLibVersion, monitor);
96+
if (toInstalLib != null) {
97+
ArduinoLibraryVersion toInstalLibVersion = toInstalLib.getNewestVersion();
98+
ArduinoLibraryVersion instaledLibVersion = toInstalLib.getInstalledVersion();
99+
if (toInstalLibVersion != null) {
100+
if (toInstalLibVersion != instaledLibVersion) {
101+
if (instaledLibVersion != null) {
102+
unInstall(instaledLibVersion, monitor);
103+
}
104+
install(toInstalLibVersion, monitor);
102105
}
103-
install(toInstalLibVersion, monitor);
104106
}
105107
}
106108
}

0 commit comments

Comments
 (0)