Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 4c45ea8

Browse files
committedJul 23, 2020
Fixed NPE in buildProgrammersMenu
Some platforms may not define directly 'build.core' because it may be defined through a custom menu. For example, the arduboy platform has in the boards.txt: [...] menu.core=Core [...] # core # arduboy-homemade.menu.core.arduboy-core=Arduboy optimized core arduboy-homemade.menu.core.arduboy-core.build.core=arduboy arduboy-homemade.menu.core.arduino-core=Standard Arduino core arduboy-homemade.menu.core.arduino-core.build.core=arduino:arduino [...] the build.core is determined only after applying the submenu options.
1 parent bf24880 commit 4c45ea8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎app/src/processing/app/Base.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1706,7 +1706,7 @@ public void rebuildProgrammerMenu() {
17061706
TargetPlatform corePlatform = null;
17071707

17081708
String core = board.getPreferences().get("build.core");
1709-
if (core.contains(":")) {
1709+
if (core != null && core.contains(":")) {
17101710
String[] split = core.split(":", 2);
17111711
corePlatform = BaseNoGui.getCurrentTargetPlatformFromPackage(split[0]);
17121712
}

0 commit comments

Comments
 (0)
Please sign in to comment.