From c793b702ed3c1ec890411db7156c63dfb3c40153 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 e71c4f5..4ada8ea 100644 --- a/src/jalview/workers/ConservationThread.java +++ b/src/jalview/workers/ConservationThread.java @@ -114,6 +114,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