From 7bdafdc04a61d581cd72cd32b0e9a31798b945ba Mon Sep 17 00:00:00 2001 From: Antony Male Date: Mon, 26 May 2014 19:00:10 +0100 Subject: [PATCH] Change an exception to an assertion, since I can't hit it in tests --- Stylet/ConductorBase.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Stylet/ConductorBase.cs b/Stylet/ConductorBase.cs index 0e5512d..b3ed674 100644 --- a/Stylet/ConductorBase.cs +++ b/Stylet/ConductorBase.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Diagnostics; using System.Linq; using System.Text; using System.Threading.Tasks; @@ -41,8 +42,7 @@ namespace Stylet /// protected virtual void EnsureItem(T newItem) { - if (newItem == null) - throw new ArgumentNullException("newItem"); + Debug.Assert(newItem != null); var newItemAsChild = newItem as IChild; if (newItemAsChild != null && newItemAsChild.Parent != this)