Skip to content

Commit f1fc079

Browse files
author
Federico Fissore
committed
MacOSX: looks like sometimes, an unlisted contribution is requested to the underlying tablemodel. Weird
1 parent e45dcba commit f1fc079

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

app/src/cc/arduino/contributions/libraries/ui/LibrariesIndexTableModel.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,9 @@ public void setValueAt(Object value, int row, int col) {
201201

202202
@Override
203203
public Object getValueAt(int row, int col) {
204+
if (row >= contributions.size()) {
205+
return null;
206+
}
204207
ContributedLibraryReleases contribution = contributions.get(row);
205208
if (col == DESCRIPTION_COL) {
206209
return contribution;// .getSelected();

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,9 @@ public void setValueAt(Object value, int row, int col) {
196196

197197
@Override
198198
public Object getValueAt(int row, int col) {
199+
if (row >= contributions.size()) {
200+
return null;
201+
}
199202
ContributedPlatformReleases contribution = contributions.get(row);
200203
if (col == DESCRIPTION_COL) {
201204
return contribution;// .getSelected();

0 commit comments

Comments
 (0)