Fixed NullReferenceException.
authorMarcos Henrich <marcos.henrich@xamarin.com>
Fri, 5 Sep 2014 12:05:12 +0000 (20:05 +0800)
committerMarcos Henrich <marcos.henrich@xamarin.com>
Mon, 15 Sep 2014 12:01:04 +0000 (13:01 +0100)
mcs/class/System.XML/System.Xml.Serialization/TypeData.cs

index 861fcc11de67455023df3b2fbe422a78319b02ec..79c89c25670e3400be1f847a5f36b2a8ecfb699b 100644 (file)
@@ -255,7 +255,7 @@ namespace System.Xml.Serialization
                                sb.Append (type.Name);
                        }
                        else {
-                               if (full && type.Namespace.Length > 0)
+                               if (full && !string.IsNullOrEmpty(type.Namespace))
                                        sb.Append (type.Namespace).Append ('.');
                                sb.Append (type.Name);
                        }