From: amwaterhouse Date: Mon, 11 Jul 2005 14:46:23 +0000 (+0000) Subject: Must check if group.sequences are null in remove gaps X-Git-Tag: Release_2_01~3 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=ea6c49b695e8d44a1f4e05c51a78e8693e031fab;p=jalview.git Must check if group.sequences are null in remove gaps --- diff --git a/src/jalview/appletgui/AlignFrame.java b/src/jalview/appletgui/AlignFrame.java index 491d2be..d320dc5 100755 --- a/src/jalview/appletgui/AlignFrame.java +++ b/src/jalview/appletgui/AlignFrame.java @@ -567,8 +567,9 @@ public class AlignFrame int start=0, end = viewport.alignment.getWidth(); - if(viewport.getSelectionGroup()!=null - || viewport.getSelectionGroup().sequences.size()<1) + if (viewport.getSelectionGroup() != null + && viewport.getSelectionGroup().sequences != null + && viewport.getSelectionGroup().sequences.size()>0) { seqs = viewport.getSelectionGroup().sequences; start = viewport.getSelectionGroup().getStartRes(); diff --git a/src/jalview/gui/AlignFrame.java b/src/jalview/gui/AlignFrame.java index 9ce03f4..cbbc635 100755 --- a/src/jalview/gui/AlignFrame.java +++ b/src/jalview/gui/AlignFrame.java @@ -917,8 +917,10 @@ public class AlignFrame extends GAlignFrame int start = 0; int end = viewport.alignment.getWidth(); + if (viewport.getSelectionGroup() != null - || viewport.getSelectionGroup().sequences.size()<1) + && viewport.getSelectionGroup().sequences != null + && viewport.getSelectionGroup().sequences.size()>0) { seqs = viewport.getSelectionGroup().sequences; start = viewport.getSelectionGroup().getStartRes();