From 752eec66975e769caf4a46623015143fd98fb0e0 Mon Sep 17 00:00:00 2001 From: reger Date: Sun, 10 May 2015 05:18:23 +0200 Subject: [PATCH] fix NPE in addToIndex when used outside searchEvent --- source/net/yacy/search/Switchboard.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/net/yacy/search/Switchboard.java b/source/net/yacy/search/Switchboard.java index b2feed96e..aa0655195 100644 --- a/source/net/yacy/search/Switchboard.java +++ b/source/net/yacy/search/Switchboard.java @@ -3246,7 +3246,8 @@ public final class Switchboard extends serverSwitch { } final Condenser condenser = new Condenser( document, null, true, true, LibraryProvider.dymLib, true, - Switchboard.this.index.fulltext().getDefaultConfiguration().contains(CollectionSchema.dates_in_content_dts), searchEvent.query.timezoneOffset); + Switchboard.this.index.fulltext().getDefaultConfiguration().contains(CollectionSchema.dates_in_content_dts), + searchEvent == null ? 0 : searchEvent.query.timezoneOffset); ResultImages.registerImages(url, document, true); Switchboard.this.webStructure.generateCitationReference(url, document); storeDocumentIndex(