From 6f57bc5b9ced5f55ed2afba8af70cb028c930f5b Mon Sep 17 00:00:00 2001 From: jprocter Date: Mon, 21 Aug 2006 12:42:25 +0000 Subject: [PATCH] avoid null pointer exceptions --- src/jalview/ws/WSThread.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/jalview/ws/WSThread.java b/src/jalview/ws/WSThread.java index 4c29537..ba82848 100644 --- a/src/jalview/ws/WSThread.java +++ b/src/jalview/ws/WSThread.java @@ -12,9 +12,9 @@ public abstract class WSThread extends Thread /** * Generic properties for Web Service Client threads. */ - AlignFrame alignFrame; + AlignFrame alignFrame=null; WebserviceInfo wsInfo = null; - AlignmentView input; + AlignmentView input=null; boolean jobComplete = false; abstract class WSJob { /** @@ -239,9 +239,11 @@ public abstract class WSThread extends Thread // System.out.println("I'm alive "+alTitle); } } - if (jobComplete) + if (jobComplete && jobs!=null) { parseResult(); // tidy up and make results available to user + } else { + Cache.log.debug("WebServiceJob poll loop finished with no jobs created."); } } abstract void StartJob(WSJob job); -- 1.7.10.2