Merge branch 'develop' into features/JAL-2360colourSchemeApplicability
[jalview.git] / src / jalview / gui / SliderPanel.java
index af77c48..83193dc 100755 (executable)
@@ -159,25 +159,37 @@ public class SliderPanel extends GSliderPanel
     return sp.getValue();
   }
 
+  /**
+   * Hides the PID slider panel if it is shown
+   */
   public static void hidePIDSlider()
   {
-    try
-    {
-      PIDSlider.setClosed(true);
-      PIDSlider = null;
-    } catch (PropertyVetoException ex)
+    if (PIDSlider != null)
     {
+      try
+      {
+        PIDSlider.setClosed(true);
+        PIDSlider = null;
+      } catch (PropertyVetoException ex)
+      {
+      }
     }
   }
 
+  /**
+   * Hides the conservation slider panel if it is shown
+   */
   public static void hideConservationSlider()
   {
-    try
-    {
-      conservationSlider.setClosed(true);
-      conservationSlider = null;
-    } catch (PropertyVetoException ex)
+    if (conservationSlider != null)
     {
+      try
+      {
+        conservationSlider.setClosed(true);
+        conservationSlider = null;
+      } catch (PropertyVetoException ex)
+      {
+      }
     }
   }