diff --git a/src/Umbraco.Web/Routing/ContentFinderByIdPath.cs b/src/Umbraco.Web/Routing/ContentFinderByIdPath.cs index 88f4388fa3..5c731171ab 100644 --- a/src/Umbraco.Web/Routing/ContentFinderByIdPath.cs +++ b/src/Umbraco.Web/Routing/ContentFinderByIdPath.cs @@ -21,7 +21,8 @@ namespace Umbraco.Web.Routing /// A value indicating whether an Umbraco document was found and assigned. public bool TryFindContent(PublishedContentRequest docRequest) { - if (UmbracoContext.Current.InPreviewMode == false && UmbracoConfig.For.UmbracoSettings().WebRouting.DisableFindContentByIdPath) + if (UmbracoContext.Current != null && UmbracoContext.Current.InPreviewMode == false + && UmbracoConfig.For.UmbracoSettings().WebRouting.DisableFindContentByIdPath) return false; IPublishedContent node = null;