From 8e7693aaf7f53b7c931ea89f40e6c704e1a0871c Mon Sep 17 00:00:00 2001 From: "DK\\psk" Date: Thu, 8 Nov 2018 19:33:40 +0200 Subject: [PATCH] Prevent System.ArgumentNullException in case switcher value is not set --- .../ContentSearch/LuceneProvider/LuceneDocumentBuilder.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Sitecore.Support.96931/ContentSearch/LuceneProvider/LuceneDocumentBuilder.cs b/src/Sitecore.Support.96931/ContentSearch/LuceneProvider/LuceneDocumentBuilder.cs index a10ef10..90a7338 100644 --- a/src/Sitecore.Support.96931/ContentSearch/LuceneProvider/LuceneDocumentBuilder.cs +++ b/src/Sitecore.Support.96931/ContentSearch/LuceneProvider/LuceneDocumentBuilder.cs @@ -23,7 +23,7 @@ public LuceneDocumentBuilder(IIndexable indexable, IProviderUpdateContext contex protected override void AddComputedIndexFieldsInParallel() { ConcurrentQueue exceptions = new ConcurrentQueue(); - var needEnterLanguageFallbackItemSwitcher = LanguageFallbackItemSwitcher.CurrentValue; + var needEnterLanguageFallbackItemSwitcher = LanguageFallbackItemSwitcher.CurrentValue ?? false; Parallel.ForEach(base.Options.ComputedIndexFields, base.ParallelOptions, delegate (IComputedIndexField computedIndexField, ParallelLoopState parallelLoopState) { object fieldValue;