aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Communications/Capabilities
diff options
context:
space:
mode:
authorAdam Frisby2009-05-10 21:00:07 +0000
committerAdam Frisby2009-05-10 21:00:07 +0000
commitdd8c01d7a730e99a2c454848a476b27640a48e3f (patch)
tree82e83ee62f7c2ccf5e363b4a413f70018b45282e /OpenSim/Framework/Communications/Capabilities
parent* Debugging some inventory related NullRefException's. (diff)
downloadopensim-SC_OLD-dd8c01d7a730e99a2c454848a476b27640a48e3f.zip
opensim-SC_OLD-dd8c01d7a730e99a2c454848a476b27640a48e3f.tar.gz
opensim-SC_OLD-dd8c01d7a730e99a2c454848a476b27640a48e3f.tar.bz2
opensim-SC_OLD-dd8c01d7a730e99a2c454848a476b27640a48e3f.tar.xz
* Attempting to fix NullRef exception in inventory.
Diffstat (limited to 'OpenSim/Framework/Communications/Capabilities')
-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();