From 14bf4bbd3253ae9380fe06ce08350e6db3b0f67b Mon Sep 17 00:00:00 2001 From: Shannon Date: Fri, 25 Nov 2016 15:55:33 +0100 Subject: [PATCH] throws exception if the delegate is already set --- src/Umbraco.Core/ObjectResolution/ApplicationEventsResolver.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Umbraco.Core/ObjectResolution/ApplicationEventsResolver.cs b/src/Umbraco.Core/ObjectResolution/ApplicationEventsResolver.cs index a90a870c30..6cb60e2df0 100644 --- a/src/Umbraco.Core/ObjectResolution/ApplicationEventsResolver.cs +++ b/src/Umbraco.Core/ObjectResolution/ApplicationEventsResolver.cs @@ -73,6 +73,8 @@ namespace Umbraco.Core.ObjectResolution { if (_resolved) throw new InvalidOperationException("Cannot set the FilterCollection delegate once the ApplicationEventHandlers are resolved"); + if (_filterCollection != null) + throw new InvalidOperationException("Cannot set the FilterCollection delegate once it's already been specified"); _filterCollection = value; }