From 2907b0dd1a18f834cb27aac4a5ab7026b8537fe3 Mon Sep 17 00:00:00 2001 From: Stephan Date: Wed, 2 Aug 2017 17:14:45 +0200 Subject: [PATCH] Blueprint fixes --- src/Umbraco.Core/Services/ContentService.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Core/Services/ContentService.cs b/src/Umbraco.Core/Services/ContentService.cs index ab53ea62fb..b53aab9350 100644 --- a/src/Umbraco.Core/Services/ContentService.cs +++ b/src/Umbraco.Core/Services/ContentService.cs @@ -1161,8 +1161,9 @@ namespace Umbraco.Core.Services using (var uow = UowProvider.GetUnitOfWork(readOnly: true)) { var repository = RepositoryFactory.CreateContentBlueprintRepository(uow); - var blueprint = repository.Get(id); - ((Content) blueprint).IsBlueprint = true; + var blueprint = repository.Get(id); + if (blueprint != null) + ((Content) blueprint).IsBlueprint = true; return blueprint; } }