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>
Thu, 9 Mar 2017 10:31:33 +0000 (10:31 +0000)
src/jalview/workers/ConservationThread.java

index e71c4f5..4ada8ea 100644 (file)
@@ -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);