Add a little more protection in getElementAt because Apples' LAF
sometimes returns -1.
This commit is contained in:
parent
4c3a16f02b
commit
375f371702
@ -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) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user