From: Ben Soares Date: Tue, 25 Oct 2022 22:03:17 +0000 (+0100) Subject: JAL-3772 silly NPE error fixed X-Git-Tag: Release_2_11_3_0~23^2~4^2~28 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=d9472f0a6405ed1666e64a500812b73ffbbd3b77;p=jalview.git JAL-3772 silly NPE error fixed --- 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; }