Add a little more protection in getElementAt because Apples' LAF

sometimes returns -1.
This commit is contained in:
kruland2607 2013-09-03 16:16:15 -05:00
parent 4c3a16f02b
commit 375f371702

View File

@ -46,7 +46,7 @@ public class DecalModel extends AbstractListModel implements ComboBoxModel {
@Override @Override
public Object getElementAt(int index) { public Object getElementAt(int index) {
if (index == 0) { if (index <= 0) {
return NONE_SELECTED; return NONE_SELECTED;
} }
if (index == getSize() - 1) { if (index == getSize() - 1) {