JAL-3772 silly NPE error fixed
authorBen Soares <bsoares@dundee.ac.uk>
Tue, 25 Oct 2022 22:03:17 +0000 (23:03 +0100)
committerBen Soares <bsoares@dundee.ac.uk>
Tue, 25 Oct 2022 22:03:17 +0000 (23:03 +0100)
src/jalview/project/Jalview2XML.java

index 351fc04..9cec063 100644 (file)
@@ -6602,12 +6602,15 @@ public class Jalview2XML
       return true;
 
     AlignFrame[] frames = Desktop.getAlignFrames();
-    for (int i = 0; i < frames.length; i++)
+    if (frames != null)
     {
-      if (frames[i] == null)
-        continue;
-      if (!frames[i].getViewport().savedUpToDate())
-        return false; // at least one alignment is not individually saved
+      for (int i = 0; i < frames.length; i++)
+      {
+        if (frames[i] == null)
+          continue;
+        if (!frames[i].getViewport().savedUpToDate())
+          return false; // at least one alignment is not individually saved
+      }
     }
     return true;
   }