From 2f1ec8d4a2e69ee5ec64f5f2ef313778e7ec790d Mon Sep 17 00:00:00 2001 From: orbiter Date: Sat, 13 Jul 2013 11:10:05 +0200 Subject: [PATCH] npe fix --- source/net/yacy/search/schema/CollectionConfiguration.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/net/yacy/search/schema/CollectionConfiguration.java b/source/net/yacy/search/schema/CollectionConfiguration.java index c1b7fe218..bdffb303d 100644 --- a/source/net/yacy/search/schema/CollectionConfiguration.java +++ b/source/net/yacy/search/schema/CollectionConfiguration.java @@ -1076,8 +1076,10 @@ public class CollectionConfiguration extends SchemaConfiguration implements Seri public int getInternalLinks(final byte[] id) { int il = (int) this.internal_links_counter.get(id); if (il >= 0) return il; + SolrConnector connector = this.segment.fulltext().getDefaultConnector(); + if (connector == null) return 0; try { - SolrDocument doc = this.segment.fulltext().getDefaultConnector().getDocumentById(ASCII.String(id), CollectionSchema.inboundlinkscount_i.getSolrFieldName()); + SolrDocument doc = connector.getDocumentById(ASCII.String(id), CollectionSchema.inboundlinkscount_i.getSolrFieldName()); if (doc == null) { this.internal_links_counter.put(id, 0); return 0;