From e1ebfaef637acd6916b519e053c1eb808c98b3c5 Mon Sep 17 00:00:00 2001 From: MW Date: Thu, 28 Jun 2007 15:56:24 +0000 Subject: Applied ScenePresence movement patch from Darok. --- OpenSim/Region/Capabilities/LLSDHelpers.cs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'OpenSim/Region/Capabilities') diff --git a/OpenSim/Region/Capabilities/LLSDHelpers.cs b/OpenSim/Region/Capabilities/LLSDHelpers.cs index 80916b4..76d9345 100644 --- a/OpenSim/Region/Capabilities/LLSDHelpers.cs +++ b/OpenSim/Region/Capabilities/LLSDHelpers.cs @@ -73,7 +73,6 @@ namespace OpenSim.Region.Capabilities } else { - //Console.WriteLine("LLSD field name" + fields[i].Name + " , " + fields[i].GetValue(obj).GetType()); writer.WriteStartElement(String.Empty, "key", String.Empty); writer.WriteString(fields[i].Name); writer.WriteEndElement(); @@ -86,12 +85,15 @@ namespace OpenSim.Region.Capabilities // LLSDArray arrayObject = obj as LLSDArray; // ArrayList a = arrayObject.Array; ArrayList a = (ArrayList)obj.GetType().GetField("Array").GetValue(obj); - writer.WriteStartElement(String.Empty, "array", String.Empty); - foreach (object item in a) + if (a != null) { - SerializeLLSDType(writer, item); + writer.WriteStartElement(String.Empty, "array", String.Empty); + foreach (object item in a) + { + SerializeLLSDType(writer, item); + } + writer.WriteEndElement(); } - writer.WriteEndElement(); break; } } -- cgit v1.1