when updating database filters, check for existence of checkboxes that may not exist depending on type of component before checking their state

This commit is contained in:
JoePfeiffer 2022-01-26 14:21:56 -07:00
parent 0cd5dcbe09
commit b68c1cd85e

View File

@ -297,10 +297,10 @@ public class ComponentPresetChooserDialog extends JDialog {
} catch (java.util.regex.PatternSyntaxException e) { } catch (java.util.regex.PatternSyntaxException e) {
} }
} }
if (aftDiameterFilterCheckBox.isSelected()) { if ((null != aftDiameterFilterCheckBox) && aftDiameterFilterCheckBox.isSelected()) {
filters.add(aftDiameterFilter); filters.add(aftDiameterFilter);
} }
if (foreDiameterFilterCheckBox.isSelected()) { if ((null != foreDiameterFilterCheckBox) && foreDiameterFilterCheckBox.isSelected()) {
filters.add(foreDiameterFilter); filters.add(foreDiameterFilter);
} }
if (!showLegacyCheckBox.isSelected()) { if (!showLegacyCheckBox.isSelected()) {