mirror of
https://github.com/arduino/Arduino.git
synced 2025-01-21 10:52:14 +01:00
Merge pull request #10922 from matthijskooijman/fix-no-board-null-pointer
rebuildProgrammerMenu: Handle no current board
This commit is contained in:
commit
76dfd0acc2
@ -1702,6 +1702,7 @@ public class Base {
|
||||
ButtonGroup group = new ButtonGroup();
|
||||
|
||||
TargetBoard board = BaseNoGui.getTargetBoard();
|
||||
if (board != null) {
|
||||
TargetPlatform boardPlatform = board.getContainerPlatform();
|
||||
TargetPlatform corePlatform = null;
|
||||
|
||||
@ -1714,6 +1715,7 @@ public class Base {
|
||||
addProgrammersForPlatform(boardPlatform, programmerMenus, group);
|
||||
if (corePlatform != null)
|
||||
addProgrammersForPlatform(corePlatform, programmerMenus, group);
|
||||
}
|
||||
|
||||
if (programmerMenus.isEmpty()) {
|
||||
JMenuItem item = new JMenuItem(tr("No programmers available for this board"));
|
||||
|
Loading…
x
Reference in New Issue
Block a user