From a7ae9ad5e7202860968f1d67e347a8d1dbd95ccf Mon Sep 17 00:00:00 2001 From: allo Date: Fri, 10 Feb 2006 16:20:17 +0000 Subject: [PATCH] avoid nullpointer git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@1601 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- htroot/ViewProfile.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/htroot/ViewProfile.java b/htroot/ViewProfile.java index e92bd7409..14222f5e6 100644 --- a/htroot/ViewProfile.java +++ b/htroot/ViewProfile.java @@ -91,7 +91,12 @@ public class ViewProfile { // read profile from other peer HashMap profile = yacyClient.getProfile(seed); yacyCore.log.logInfo("fetched profile:" + profile); - Iterator i = profile.entrySet().iterator(); + Iterator i; + if(profile != null){ + i = profile.entrySet().iterator(); + }else{ + i = (new ArrayList()).iterator(); + } Map.Entry entry; //all known keys which should be set as they are ArrayList knownKeys = new ArrayList();