From b2414c1ab87a4bdc0e192fe4d9c2f4573d8a188a Mon Sep 17 00:00:00 2001 From: Sebastiaan Janssen Date: Tue, 26 Mar 2013 09:33:08 -0100 Subject: [PATCH 1/2] Fixes U4-1987 Error when attempting to save document type --- src/umbraco.cms/businesslogic/ContentType.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/umbraco.cms/businesslogic/ContentType.cs b/src/umbraco.cms/businesslogic/ContentType.cs index 2154ec0118..bd136b1b44 100644 --- a/src/umbraco.cms/businesslogic/ContentType.cs +++ b/src/umbraco.cms/businesslogic/ContentType.cs @@ -144,7 +144,8 @@ namespace umbraco.cms.businesslogic } foreach (Tuple key in toDelete) { - _propertyTypeCache.Remove(key); + if(_propertyTypeCache.ContainsKey(key)) + _propertyTypeCache.Remove(key); } } //don't put lock around this as it is ConcurrentDictionary. From ff961abaabd15f2239ca29cd63c29d203b6b7eac Mon Sep 17 00:00:00 2001 From: Sebastiaan Janssen Date: Tue, 26 Mar 2013 09:50:48 -0100 Subject: [PATCH 2/2] Actual fix for U4-1987 Error when attempting to save document type --- src/umbraco.cms/businesslogic/ContentType.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/umbraco.cms/businesslogic/ContentType.cs b/src/umbraco.cms/businesslogic/ContentType.cs index bd136b1b44..073324fa96 100644 --- a/src/umbraco.cms/businesslogic/ContentType.cs +++ b/src/umbraco.cms/businesslogic/ContentType.cs @@ -144,7 +144,7 @@ namespace umbraco.cms.businesslogic } foreach (Tuple key in toDelete) { - if(_propertyTypeCache.ContainsKey(key)) + if(_propertyTypeCache != null) _propertyTypeCache.Remove(key); } }