From d9c066227a36aa2cf294b21b3479092c5760c87d Mon Sep 17 00:00:00 2001 From: orbiter Date: Mon, 28 Nov 2011 13:36:51 +0000 Subject: [PATCH] fix for npe git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@8122 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- source/net/yacy/search/query/SearchEvent.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/net/yacy/search/query/SearchEvent.java b/source/net/yacy/search/query/SearchEvent.java index 3232ddb39..3c79ba71c 100644 --- a/source/net/yacy/search/query/SearchEvent.java +++ b/source/net/yacy/search/query/SearchEvent.java @@ -115,7 +115,7 @@ public final class SearchEvent { this.IAneardhthash = null; this.localSearchThread = null; this.order = new ReferenceOrder(this.query.ranking, UTF8.getBytes(this.query.targetlang)); - final boolean remote = peers.sizeConnected() > 0 && (this.query.domType == QueryParams.Searchdom.CLUSTER || (this.query.domType == QueryParams.Searchdom.GLOBAL && peers.mySeed().getFlagAcceptRemoteIndex())); + final boolean remote = (peers != null && peers.sizeConnected() > 0) && (this.query.domType == QueryParams.Searchdom.CLUSTER || (this.query.domType == QueryParams.Searchdom.GLOBAL && peers.mySeed().getFlagAcceptRemoteIndex())); final long start = System.currentTimeMillis(); // initialize a ranking process that is the target for data