Skip to content

Commit 8079a7c

Browse files
author
Federico Fissore
committed
BM: Fixed NPE when supported boards list is empty
1 parent e544891 commit 8079a7c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

app/src/cc/arduino/contributions/packages/ui/ContributedPlatformTableCell.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,9 @@ private Component getUpdatedCellComponent(Object value, boolean isSelected, int
368368
for (ContributedBoard board : selected.getBoards()) {
369369
desc += board.getName() + ", ";
370370
}
371-
desc = desc.substring(0, desc.lastIndexOf(',')) + ".<br />";
371+
if (desc.lastIndexOf(',') != -1) {
372+
desc = desc.substring(0, desc.lastIndexOf(',')) + ".<br />";
373+
}
372374

373375
ContributedHelp help = null;
374376
if (selected.getHelp() != null) {

0 commit comments

Comments
 (0)