From f7b0b3b7b3bcd2ca5c370b9c0240d44410b1fb56 Mon Sep 17 00:00:00 2001 From: reger Date: Sun, 23 Aug 2015 23:01:20 +0200 Subject: [PATCH] avoid runtime exception by earlier testing for seed.ip=null --- source/net/yacy/peers/Protocol.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/net/yacy/peers/Protocol.java b/source/net/yacy/peers/Protocol.java index ceafce8d2..bc7463c90 100644 --- a/source/net/yacy/peers/Protocol.java +++ b/source/net/yacy/peers/Protocol.java @@ -1379,11 +1379,11 @@ public final class Protocol { boolean gzipBody, final int timeout) { String ip = targetSeed.getIP(); - final String address = targetSeed.getPublicAddress(ip); - if ( address == null ) { + if ( ip == null ) { Network.log.warn("no address for transferRWI"); return null; } + final String address = targetSeed.getPublicAddress(ip); // prepare post values final String salt = crypt.randomSalt();