From 5e299d7880ca979797720dd1276b7bf9b92b90c8 Mon Sep 17 00:00:00 2001 From: Jeavon Date: Mon, 21 Oct 2019 10:10:08 +0100 Subject: [PATCH] Add additional null checks on GridPropertyEditor in case it's executed in the front end context without CurrentUser --- src/Umbraco.Web/PropertyEditors/GridPropertyEditor.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Web/PropertyEditors/GridPropertyEditor.cs b/src/Umbraco.Web/PropertyEditors/GridPropertyEditor.cs index 2c2c69d181..9b7045f3b7 100644 --- a/src/Umbraco.Web/PropertyEditors/GridPropertyEditor.cs +++ b/src/Umbraco.Web/PropertyEditors/GridPropertyEditor.cs @@ -89,7 +89,7 @@ namespace Umbraco.Web.PropertyEditors var grid = DeserializeGridValue(rawJson, out var rtes); - var userId = _umbracoContextAccessor.UmbracoContext?.Security.CurrentUser.Id ?? Constants.Security.SuperUserId; + var userId = _umbracoContextAccessor.UmbracoContext?.Security?.CurrentUser?.Id ?? Constants.Security.SuperUserId; //process the rte values foreach (var rte in rtes)