Fix persistant bug report which is reproduced by undoing the addition of

a flight configuration.  Need to test if the current selection in the
flight configuration table is off the table's current size.
This commit is contained in:
kruland2607 2014-10-28 20:28:20 -05:00
parent 1c48d69c8c
commit 78d0eaefbd

View File

@ -148,7 +148,7 @@ public abstract class FlightConfigurablePanel<T extends FlightConfigurableCompon
protected String getSelectedConfigurationId() {
int col = table.convertColumnIndexToModel(table.getSelectedColumn());
int row = table.convertRowIndexToModel(table.getSelectedRow());
if ( row < 0 || col < 0 ) {
if ( row < 0 || col < 0 || row >= table.getRowCount() || col >= table.getColumnCount() ) {
return null;
}
Object tableValue = table.getModel().getValueAt(row, col);