Skip to content

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

*) avoid nullpointerException on seed.getAddress() (reported by netbude)

theli26450a1d9ac4
diff --git a/source/de/anomic/yacy/yacySeedDB.java b/source/de/anomic/yacy/yacySeedDB.java
index 0c84186ab..a38b8f7d6 100644
--- a/source/de/anomic/yacy/yacySeedDB.java
+++ b/source/de/anomic/yacy/yacySeedDB.java
@@ -573,6 +573,10 @@ public final class yacySeedDB {
seed = (yacySeed) e.nextElement();
if (seed != null) {
addressStr = seed.getAddress();
+ if (addressStr == null) {
+ serverLog.logWarning("YACY","lookupByIP: address of seed " + seed.getName() + "is null.");
+ continue;
+ }
if ((pos = addressStr.indexOf(":"))!= -1) {
addressStr = addressStr.substring(0,pos);
}