From 67bb04bf601a6f5bc2bf2d568a1bd73a8656072a Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Wed, 19 Jun 2013 17:41:27 +0100 Subject: [PATCH] JAL-1240 avoid NPE when source has no proxy available --- src/jalview/ws/DBRefFetcher.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/jalview/ws/DBRefFetcher.java b/src/jalview/ws/DBRefFetcher.java index a55658b..17c1bc9 100644 --- a/src/jalview/ws/DBRefFetcher.java +++ b/src/jalview/ws/DBRefFetcher.java @@ -136,10 +136,13 @@ public class DBRefFetcher implements Runnable { jalviewSourceI src = en.nextElement(); List 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. -- 1.7.10.2