From b9d24579836115a452ca148a8ee8e82f4085f03b Mon Sep 17 00:00:00 2001 From: "rick@gibbed.us" Date: Thu, 14 Jun 2012 20:18:33 +0200 Subject: [PATCH] Do not serialize ListViewItem.Group if it's null. Fixes Xamarin bug 3840. --- .../Managed.Windows.Forms/System.Windows.Forms/ListViewItem.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListViewItem.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListViewItem.cs index a33e23fd6c7..05008ce8760 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListViewItem.cs +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListViewItem.cs @@ -811,7 +811,8 @@ namespace System.Windows.Forms info.AddValue ("BackColor", BackColor); info.AddValue ("ForeColor", ForeColor); info.AddValue ("ImageKey", image_key); - info.AddValue ("Group", group); + if (group != null) + info.AddValue ("Group", group); if (sub_items.Count > 1) { info.AddValue ("SubItemCount", sub_items.Count); for (int i = 1; i < sub_items.Count; i++) { -- 2.25.1