diff --git a/src/Umbraco.Web/PropertyEditors/BlockEditorPropertyEditor.cs b/src/Umbraco.Web/PropertyEditors/BlockEditorPropertyEditor.cs index b2eab4f8ab65..16907edd0bdc 100644 --- a/src/Umbraco.Web/PropertyEditors/BlockEditorPropertyEditor.cs +++ b/src/Umbraco.Web/PropertyEditors/BlockEditorPropertyEditor.cs @@ -258,7 +258,7 @@ public IEnumerable Validate(object value, string valueType, ob _textService.Localize("validation", "entriesShort", new[] { validationLimit.Min.ToString(), - (validationLimit.Min - blockEditorData.Layout.Count()).ToString() + (validationLimit.Min - (blockEditorData?.Layout.Count() ?? 0)).ToString() }), new[] { "minCount" }); }