Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcos Henrich <marcos.henrich@xamarin.com>2014-08-29 13:59:39 +0400
committerMarcos Henrich <marcos.henrich@xamarin.com>2014-08-29 13:59:39 +0400
commitacb0cc0d7d55fd862eb593a6cb00832db1f404df (patch)
treed70adcaf64b31769022b5dff6758c2232b263198 /mcs/class/System.Xml.Linq
parent8308eb87e05e658ebafe38fd917a7fff2fa1a6ed (diff)
Fixes XContainer attempt to create a XNode from a null value.
Fixes #20151.
Diffstat (limited to 'mcs/class/System.Xml.Linq')
-rw-r--r--mcs/class/System.Xml.Linq/System.Xml.Linq/XContainer.cs3
1 files changed, 3 insertions, 0 deletions
diff --git a/mcs/class/System.Xml.Linq/System.Xml.Linq/XContainer.cs b/mcs/class/System.Xml.Linq/System.Xml.Linq/XContainer.cs
index af5fd976403..25e967583cb 100644
--- a/mcs/class/System.Xml.Linq/System.Xml.Linq/XContainer.cs
+++ b/mcs/class/System.Xml.Linq/System.Xml.Linq/XContainer.cs
@@ -72,6 +72,9 @@ namespace System.Xml.Linq
foreach (object o in XUtil.ExpandArray (content))
{
+ if (o == null)
+ continue;
+
if (!OnAddingObject (o, false, last, false))
{
var node = XUtil.ToNode (o);