From cd197bb555af41f6dba39c6a19e748ff00d81778 Mon Sep 17 00:00:00 2001 From: orbiter Date: Sun, 10 Mar 2013 19:46:06 +0100 Subject: [PATCH] fix for NPE if surrogates do not exist --- source/net/yacy/search/Switchboard.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/net/yacy/search/Switchboard.java b/source/net/yacy/search/Switchboard.java index 0eff8cc9c..16ca11ada 100644 --- a/source/net/yacy/search/Switchboard.java +++ b/source/net/yacy/search/Switchboard.java @@ -1973,7 +1973,7 @@ public final class Switchboard extends serverSwitch { try { // check surrogates final String[] surrogatelist = this.surrogatesInPath.list(); - if ( surrogatelist.length > 0 ) { + if ( surrogatelist != null && surrogatelist.length > 0 ) { // look if the is any xml inside for ( final String surrogate : surrogatelist ) {