From: gmungoc Date: Tue, 7 Apr 2015 08:17:00 +0000 (+0100) Subject: JAL-1691 defensive check for null X-Git-Tag: Jalview_2_9~69^2~14 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=71881f2cf715e6143cd594e20bd41db538282f81;p=jalview.git JAL-1691 defensive check for null --- diff --git a/src/jalview/datamodel/HiddenSequences.java b/src/jalview/datamodel/HiddenSequences.java index 35e7930..929e56e 100755 --- a/src/jalview/datamodel/HiddenSequences.java +++ b/src/jalview/datamodel/HiddenSequences.java @@ -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; + } } }