mirror of https://github.com/AMT-Cheif/Stylet.git
Change an exception to an assertion, since I can't hit it in tests
This commit is contained in:
parent
7203b02cdf
commit
7bdafdc04a
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue