@@ -1702,18 +1702,20 @@ public void rebuildProgrammerMenu() {
17021702 ButtonGroup group = new ButtonGroup ();
17031703
17041704 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 ;
17071708
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+ }
17131714
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+ }
17171719
17181720 if (programmerMenus .isEmpty ()) {
17191721 JMenuItem item = new JMenuItem (tr ("No programmers available for this board" ));
0 commit comments