Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

avoid nullpointer

alloa7ae9ad5e720
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();