From d862ec6b58b37b80416c7a65d7069f6e785276c1 Mon Sep 17 00:00:00 2001 From: kiramt Date: Tue, 28 Feb 2017 14:50:10 +0000 Subject: [PATCH] JAL-2426 Removal of NPE in conservation thread when closing Jalview --- src/jalview/workers/ConservationThread.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/jalview/workers/ConservationThread.java b/src/jalview/workers/ConservationThread.java index b2a67b7..571234c 100644 --- a/src/jalview/workers/ConservationThread.java +++ b/src/jalview/workers/ConservationThread.java @@ -115,6 +115,12 @@ public class ConservationThread extends AlignCalcWorker } calcMan.workerComplete(this); + if ((alignViewport == null) || (calcMan == null) + || (alignViewport.isClosed())) + { + abortAndDestroy(); + return; + } if (ap != null) { ap.paintAlignment(true); -- 1.7.10.2