Change an exception to an assertion, since I can't hit it in tests

This commit is contained in:
Antony Male 2014-05-26 19:00:10 +01:00
parent 7203b02cdf
commit 7bdafdc04a
1 changed files with 2 additions and 2 deletions

View File

@ -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
/// </summary>
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)