JAL-2426 Removal of NPE in conservation thread when closing Jalview
authorkiramt <k.mourao@dundee.ac.uk>
Tue, 28 Feb 2017 14:50:10 +0000 (14:50 +0000)
committerkiramt <k.mourao@dundee.ac.uk>
Tue, 28 Feb 2017 14:50:10 +0000 (14:50 +0000)
src/jalview/workers/ConservationThread.java

index b2a67b7..571234c 100644 (file)
@@ -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);