From a04a7992b1055fa52f5031ef9d10d2228ee78899 Mon Sep 17 00:00:00 2001 From: James Procter Date: Mon, 23 Oct 2023 09:25:34 +0100 Subject: [PATCH] JAL-4090 defensive check for featureSettings redraws when feature filter attrbute is null (noticed whilst testing) --- src/jalview/gui/FeatureSettings.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/jalview/gui/FeatureSettings.java b/src/jalview/gui/FeatureSettings.java index 184fdc5..4d31805 100644 --- a/src/jalview/gui/FeatureSettings.java +++ b/src/jalview/gui/FeatureSettings.java @@ -1787,11 +1787,15 @@ public class FeatureSettings extends JPanel { FeatureMatcherSetI theFilter = (FeatureMatcherSetI) filter; setOpaque(true); - String asText = theFilter.toString(); setBackground(tbl.getBackground()); - this.setText(asText); this.setIcon(null); + if (theFilter != null) + { + String asText = theFilter.toString(); + this.setText(asText); + } + if (isSelected) { if (selectedBorder == null) -- 1.7.10.2