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