1
0
mirror of https://github.com/arduino/Arduino.git synced 2024-12-01 12:24:14 +01:00

MacOSX: looks like sometimes, an unlisted contribution is requested to the underlying tablemodel. Weird

This commit is contained in:
Federico Fissore 2015-04-02 11:03:12 +02:00
parent e45dcba6c9
commit f1fc0797e1
2 changed files with 6 additions and 0 deletions

View File

@ -201,6 +201,9 @@ public class LibrariesIndexTableModel extends FilteredAbstractTableModel<Contrib
@Override @Override
public Object getValueAt(int row, int col) { public Object getValueAt(int row, int col) {
if (row >= contributions.size()) {
return null;
}
ContributedLibraryReleases contribution = contributions.get(row); ContributedLibraryReleases contribution = contributions.get(row);
if (col == DESCRIPTION_COL) { if (col == DESCRIPTION_COL) {
return contribution;// .getSelected(); return contribution;// .getSelected();

View File

@ -196,6 +196,9 @@ public class ContributionIndexTableModel extends FilteredAbstractTableModel<Cont
@Override @Override
public Object getValueAt(int row, int col) { public Object getValueAt(int row, int col) {
if (row >= contributions.size()) {
return null;
}
ContributedPlatformReleases contribution = contributions.get(row); ContributedPlatformReleases contribution = contributions.get(row);
if (col == DESCRIPTION_COL) { if (col == DESCRIPTION_COL) {
return contribution;// .getSelected(); return contribution;// .getSelected();