Bugfix: Sometimes the httpcontext is null here

This commit is contained in:
Bjarke Berg
2020-02-25 21:11:17 +01:00
parent bf4023afa7
commit 5e1ac76e5f

View File

@@ -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();