mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 11:55:49 +00:00
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:
parent
60a1c9c1c5
commit
834458b4fa
@ -65,7 +65,11 @@ public class FolderCombo extends JComboBox {
|
||||
fInclude = aInclude;
|
||||
fExclude = aExclude;
|
||||
|
||||
// this hack is getting old. why do i need it in the first place?
|
||||
// this sucks!
|
||||
if (getItemCount() > 0) {
|
||||
removeAllItems();
|
||||
}
|
||||
|
||||
try {
|
||||
for (int i = 0; i < stores.length; i++) {
|
||||
|
Loading…
Reference in New Issue
Block a user