From 71881f2cf715e6143cd594e20bd41db538282f81 Mon Sep 17 00:00:00 2001 From: gmungoc Date: Tue, 7 Apr 2015 09:17:00 +0100 Subject: [PATCH] JAL-1691 defensive check for null --- src/jalview/datamodel/HiddenSequences.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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; + } } } -- 1.7.10.2