From 5f175874b2d4e68c12972ab316c386c4cbb7837d Mon Sep 17 00:00:00 2001 From: Sebastiaan Janssen Date: Thu, 2 Apr 2015 17:52:59 +0200 Subject: [PATCH] Fixes tests and adds a few --- src/Umbraco.Web/Routing/ContentFinderByIdPath.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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;