mirror of
https://github.com/arduino/Arduino.git
synced 2025-02-01 21:52:12 +01:00
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.
This commit is contained in:
parent
bf24880d7c
commit
4c45ea8ecc
@ -1706,7 +1706,7 @@ public class Base {
|
|||||||
TargetPlatform corePlatform = null;
|
TargetPlatform corePlatform = null;
|
||||||
|
|
||||||
String core = board.getPreferences().get("build.core");
|
String core = board.getPreferences().get("build.core");
|
||||||
if (core.contains(":")) {
|
if (core != null && core.contains(":")) {
|
||||||
String[] split = core.split(":", 2);
|
String[] split = core.split(":", 2);
|
||||||
corePlatform = BaseNoGui.getCurrentTargetPlatformFromPackage(split[0]);
|
corePlatform = BaseNoGui.getCurrentTargetPlatformFromPackage(split[0]);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user