aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/Communications/Capabilities/LLSDHelpers.cs12
1 files changed, 6 insertions, 6 deletions
diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDHelpers.cs b/OpenSim/Framework/Communications/Capabilities/LLSDHelpers.cs
index ca68e85..ba82c75 100644
--- a/OpenSim/Framework/Communications/Capabilities/LLSDHelpers.cs
+++ b/OpenSim/Framework/Communications/Capabilities/LLSDHelpers.cs
@@ -66,7 +66,7 @@ namespace OpenSim.Framework.Communications.Capabilities
66 FieldInfo[] fields = myType.GetFields(); 66 FieldInfo[] fields = myType.GetFields();
67 for (int i = 0; i < fields.Length; i++) 67 for (int i = 0; i < fields.Length; i++)
68 { 68 {
69 try 69 if (fields[i] != null && fields[i].GetValue(obj) != null)
70 { 70 {
71 object fieldValue = fields[i].GetValue(obj); 71 object fieldValue = fields[i].GetValue(obj);
72 LLSDType[] fieldAttributes = 72 LLSDType[] fieldAttributes =
@@ -91,12 +91,12 @@ namespace OpenSim.Framework.Communications.Capabilities
91 // OpenMetaverse.StructuredData.LLSDParser.SerializeXmlElement( 91 // OpenMetaverse.StructuredData.LLSDParser.SerializeXmlElement(
92 // writer, OpenMetaverse.StructuredData.OSD.FromObject(fieldValue)); 92 // writer, OpenMetaverse.StructuredData.OSD.FromObject(fieldValue));
93 } 93 }
94 } catch(NullReferenceException e) 94 }
95 else
95 { 96 {
96 System.Console.WriteLine("-----------NRE-------------"); 97 // TODO from ADAM: There is a nullref being caused by fields[i] being null
97 System.Console.WriteLine("Type: " + fields[i].GetValue(obj).GetType().FullName); 98 // on some computers. Unsure what is causing this, but would appreciate
98 System.Console.WriteLine("-----------NRE-------------"); 99 // if sdague could take a look at this.
99 throw;
100 } 100 }
101 } 101 }
102 writer.WriteEndElement(); 102 writer.WriteEndElement();