From d9472f0a6405ed1666e64a500812b73ffbbd3b77 Mon Sep 17 00:00:00 2001 From: Ben Soares Date: Tue, 25 Oct 2022 23:03:17 +0100 Subject: [PATCH] JAL-3772 silly NPE error fixed --- src/jalview/project/Jalview2XML.java | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/jalview/project/Jalview2XML.java b/src/jalview/project/Jalview2XML.java index 351fc04..9cec063 100644 --- a/src/jalview/project/Jalview2XML.java +++ b/src/jalview/project/Jalview2XML.java @@ -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; } -- 1.7.10.2