From bece953fa358f279137bd94cf7ac93814cf21140 Mon Sep 17 00:00:00 2001 From: Shannon Date: Wed, 26 Nov 2014 10:20:19 +1100 Subject: [PATCH] fixes a null check --- src/Umbraco.Web/Models/Mapping/ContentModelMapper.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Web/Models/Mapping/ContentModelMapper.cs b/src/Umbraco.Web/Models/Mapping/ContentModelMapper.cs index 78e3bb1d05..62b734068e 100644 --- a/src/Umbraco.Web/Models/Mapping/ContentModelMapper.cs +++ b/src/Umbraco.Web/Models/Mapping/ContentModelMapper.cs @@ -117,7 +117,8 @@ namespace Umbraco.Web.Models.Mapping //fill in the template config to be passed to the template drop down. var templateItemConfig = new Dictionary { { "", "Choose..." } }; - foreach (var t in content.ContentType.AllowedTemplates) + foreach (var t in content.ContentType.AllowedTemplates + .Where(t => t.Alias.IsNullOrWhiteSpace() == false && t.Name.IsNullOrWhiteSpace() == false)) { templateItemConfig.Add(t.Alias, t.Name); }