Stupid stupid stupid. JComboBox.removeAllItems() NullExceptions if
there's a zero count. The safe way to call it is by: if (combobox.getItemCount() > 0) { combobox.removeAllItems(); } This is stupid.
This commit is contained in:
Родитель
729eee902b
Коммит
5dd5a2f5eb
|
@ -65,7 +65,11 @@ public class FolderCombo extends JComboBox {
|
||||||
fInclude = aInclude;
|
fInclude = aInclude;
|
||||||
fExclude = aExclude;
|
fExclude = aExclude;
|
||||||
|
|
||||||
removeAllItems();
|
// this hack is getting old. why do i need it in the first place?
|
||||||
|
// this sucks!
|
||||||
|
if (getItemCount() > 0) {
|
||||||
|
removeAllItems();
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
for (int i = 0; i < stores.length; i++) {
|
for (int i = 0; i < stores.length; i++) {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче