bugfix for alignments without aligned codon frames
authorjprocter <Jim Procter>
Mon, 29 Oct 2007 12:46:02 +0000 (12:46 +0000)
committerjprocter <Jim Procter>
Mon, 29 Oct 2007 12:46:02 +0000 (12:46 +0000)
src/jalview/ws/WSThread.java

index a23dfe1..f3dd969 100644 (file)
@@ -339,8 +339,11 @@ public abstract class WSThread
     if (alignFrame!=null)
     {
       AlignedCodonFrame[] cf = alignFrame.getViewport().getAlignment().getCodonFrames();
-      codonframe = new AlignedCodonFrame[cf.length];
-      System.arraycopy(cf, 0, codonframe, 0, cf.length);
+      if (cf!=null)
+      {
+        codonframe = new AlignedCodonFrame[cf.length];
+        System.arraycopy(cf, 0, codonframe, 0, cf.length);
+      }
     }
   }
 }