diff options
author | Marcos Henrich <marcos.henrich@xamarin.com> | 2014-08-29 13:59:39 +0400 |
---|---|---|
committer | Marcos Henrich <marcos.henrich@xamarin.com> | 2014-08-29 13:59:39 +0400 |
commit | acb0cc0d7d55fd862eb593a6cb00832db1f404df (patch) | |
tree | d70adcaf64b31769022b5dff6758c2232b263198 /mcs/class/System.Xml.Linq | |
parent | 8308eb87e05e658ebafe38fd917a7fff2fa1a6ed (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.cs | 3 |
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); |