Merge branch 'develop' into bug/JAL-2461
[jalview.git] / src / jalview / datamodel / Alignment.java
index 41488ea..2dafc0c 100755 (executable)
@@ -1011,6 +1011,10 @@ public class Alignment implements AlignmentI
     }
     else if (dataset == null && data != null)
     {
+      if (data == this)
+      {
+        throw new IllegalArgumentException("Circular dataset reference");
+      }
       if (!(data instanceof Alignment))
       {
         throw new Error(