Skip to content

Commit 907af81

Browse files
author
Federico Fissore
committed
Fixed NPE when "tools" key was missing in package_*_index.json file
1 parent 65d220d commit 907af81

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

arduino-core/src/cc/arduino/contributions/packages/ContributedPackage.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ public ContributedPlatform findPlatform(String architecture, String version) {
6161
}
6262

6363
public ContributedTool findTool(String name, String version) {
64+
if (getTools() == null) {
65+
return null;
66+
}
6467
for (ContributedTool tool : getTools()) {
6568
if (tool.getName().equals(name) && tool.getVersion().equals(version))
6669
return tool;

0 commit comments

Comments
 (0)