@@ -1704,18 +1704,20 @@ public void rebuildProgrammerMenu() {
1704
1704
ButtonGroup group = new ButtonGroup ();
1705
1705
1706
1706
TargetBoard board = BaseNoGui .getTargetBoard ();
1707
- TargetPlatform boardPlatform = board .getContainerPlatform ();
1708
- TargetPlatform corePlatform = null ;
1707
+ if (board != null ) {
1708
+ TargetPlatform boardPlatform = board .getContainerPlatform ();
1709
+ TargetPlatform corePlatform = null ;
1709
1710
1710
- String core = board .getPreferences ().get ("build.core" );
1711
- if (core != null && core .contains (":" )) {
1712
- String [] split = core .split (":" , 2 );
1713
- corePlatform = BaseNoGui .getCurrentTargetPlatformFromPackage (split [0 ]);
1714
- }
1711
+ String core = board .getPreferences ().get ("build.core" );
1712
+ if (core != null && core .contains (":" )) {
1713
+ String [] split = core .split (":" , 2 );
1714
+ corePlatform = BaseNoGui .getCurrentTargetPlatformFromPackage (split [0 ]);
1715
+ }
1715
1716
1716
- addProgrammersForPlatform (boardPlatform , programmerMenus , group );
1717
- if (corePlatform != null )
1718
- addProgrammersForPlatform (corePlatform , programmerMenus , group );
1717
+ addProgrammersForPlatform (boardPlatform , programmerMenus , group );
1718
+ if (corePlatform != null )
1719
+ addProgrammersForPlatform (corePlatform , programmerMenus , group );
1720
+ }
1719
1721
1720
1722
if (programmerMenus .isEmpty ()) {
1721
1723
JMenuItem item = new JMenuItem (tr ("No programmers available for this board" ));
0 commit comments