Resolves issue with array out of bounds exception on shutdown while

removing tuners from the tuner model.
This commit is contained in:
Denny
2018-07-20 05:59:00 -04:00
parent 61ae0d2d83
commit 5c0d97d942

View File

@@ -85,9 +85,12 @@ public class TunerViewPanel extends JPanel
if(!event.getValueIsAdjusting())
{
int row = mTunerTable.getSelectedRow();
int modelRow = mTunerTable.convertRowIndexToModel(row);
mTunerEditor.setItem(mTunerModel.getTuner(modelRow));
if(row >= 0)
{
int modelRow = mTunerTable.convertRowIndexToModel(row);
mTunerEditor.setItem(mTunerModel.getTuner(modelRow));
}
}
}
});