From ea6c49b695e8d44a1f4e05c51a78e8693e031fab Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Mon, 11 Jul 2005 14:46:23 +0000 Subject: [PATCH] Must check if group.sequences are null in remove gaps --- src/jalview/appletgui/AlignFrame.java | 5 +++-- src/jalview/gui/AlignFrame.java | 4 +++- 2 files changed, 6 insertions(+), 3 deletions(-) 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(); -- 1.7.10.2