Must check if group.sequences are null in remove gaps
authoramwaterhouse <Andrew Waterhouse>
Mon, 11 Jul 2005 14:46:23 +0000 (14:46 +0000)
committeramwaterhouse <Andrew Waterhouse>
Mon, 11 Jul 2005 14:46:23 +0000 (14:46 +0000)
src/jalview/appletgui/AlignFrame.java
src/jalview/gui/AlignFrame.java

index 491d2be..d320dc5 100755 (executable)
@@ -567,8 +567,9 @@ public class AlignFrame
 \r
     int start=0, end = viewport.alignment.getWidth();\r
 \r
-    if(viewport.getSelectionGroup()!=null\r
-     || viewport.getSelectionGroup().sequences.size()<1)\r
+    if (viewport.getSelectionGroup() != null\r
+        && viewport.getSelectionGroup().sequences != null\r
+        && viewport.getSelectionGroup().sequences.size()>0)\r
     {\r
       seqs = viewport.getSelectionGroup().sequences;\r
       start = viewport.getSelectionGroup().getStartRes();\r
index 9ce03f4..cbbc635 100755 (executable)
@@ -917,8 +917,10 @@ public class AlignFrame extends GAlignFrame
         int start = 0;\r
         int end = viewport.alignment.getWidth();\r
 \r
+\r
         if (viewport.getSelectionGroup() != null\r
-            || viewport.getSelectionGroup().sequences.size()<1)\r
+            && viewport.getSelectionGroup().sequences != null\r
+            && viewport.getSelectionGroup().sequences.size()>0)\r
         {\r
             seqs = viewport.getSelectionGroup().sequences;\r
             start = viewport.getSelectionGroup().getStartRes();\r