JAL-1240 avoid NPE when source has no proxy available
authorJim Procter <jprocter@compbio.dundee.ac.uk>
Wed, 19 Jun 2013 16:41:27 +0000 (17:41 +0100)
committerJim Procter <jprocter@compbio.dundee.ac.uk>
Wed, 19 Jun 2013 16:41:27 +0000 (17:41 +0100)
src/jalview/ws/DBRefFetcher.java

index a55658b..17c1bc9 100644 (file)
@@ -136,10 +136,13 @@ public class DBRefFetcher implements Runnable
       {
         jalviewSourceI src = en.nextElement();
         List<DbSourceProxy> sp = src.getSequenceSourceProxies();
-        selsources.addAll(sp);
-        if (sp.size() > 1)
+        if (sp != null)
         {
-          Cache.log.debug("Added many Db Sources for :" + src.getTitle());
+          selsources.addAll(sp);
+          if (sp.size() > 1)
+          {
+            Cache.log.debug("Added many Db Sources for :" + src.getTitle());
+          }
         }
       }
       // select appropriate databases based on alignFrame context.