From 5e1ac76e5f524ff6304f565ca78f5566952241fb Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Tue, 25 Feb 2020 21:11:17 +0100 Subject: [PATCH] Bugfix: Sometimes the httpcontext is null here --- src/Umbraco.Web/UmbracoContext.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Web/UmbracoContext.cs b/src/Umbraco.Web/UmbracoContext.cs index ded6182e17..a4f679ff5f 100644 --- a/src/Umbraco.Web/UmbracoContext.cs +++ b/src/Umbraco.Web/UmbracoContext.cs @@ -57,7 +57,7 @@ namespace Umbraco.Web // // all in all, this context may be disposed more than once, but DisposableObject ensures that // it is ok and it will be actually disposed only once. - httpContextAccessor.GetRequiredHttpContext().DisposeOnPipelineCompleted(this); + httpContextAccessor.HttpContext?.DisposeOnPipelineCompleted(this); ObjectCreated = DateTime.Now; UmbracoRequestId = Guid.NewGuid();