JAL-1691 defensive check for null
authorgmungoc <g.m.carstairs@dundee.ac.uk>
Tue, 7 Apr 2015 08:17:00 +0000 (09:17 +0100)
committergmungoc <g.m.carstairs@dundee.ac.uk>
Tue, 7 Apr 2015 08:17:00 +0000 (09:17 +0100)
src/jalview/datamodel/HiddenSequences.java

index 35e7930..929e56e 100755 (executable)
@@ -278,11 +278,14 @@ public class HiddenSequences
 
   public boolean isHidden(SequenceI seq)
   {
-    for (int i = 0; i < hiddenSequences.length; i++)
+    if (hiddenSequences != null)
     {
-      if (hiddenSequences[i] != null && hiddenSequences[i] == seq)
+      for (int i = 0; i < hiddenSequences.length; i++)
       {
-        return true;
+        if (hiddenSequences[i] != null && hiddenSequences[i] == seq)
+        {
+          return true;
+        }
       }
     }