From 26fd673e20f56cd8f7b611d4767ad8c9d65b02f6 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Thu, 26 Aug 2010 12:26:09 -0700 Subject: Addresses mantis #4984 -- Datasnapshot exceptions. --- OpenSim/Region/DataSnapshot/ObjectSnapshot.cs | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/DataSnapshot/ObjectSnapshot.cs') diff --git a/OpenSim/Region/DataSnapshot/ObjectSnapshot.cs b/OpenSim/Region/DataSnapshot/ObjectSnapshot.cs index c489972..3c39f9e 100644 --- a/OpenSim/Region/DataSnapshot/ObjectSnapshot.cs +++ b/OpenSim/Region/DataSnapshot/ObjectSnapshot.cs @@ -142,9 +142,18 @@ namespace OpenSim.Region.DataSnapshot.Providers node.InnerText = m_scene.RegionInfo.RegionSettings.RegionUUID.ToString(); xmlobject.AppendChild(node); - node = nodeFactory.CreateNode(XmlNodeType.Element, "parceluuid", ""); - node.InnerText = land.LandData.GlobalID.ToString(); - xmlobject.AppendChild(node); + if (land != null && land.LandData != null) + { + node = nodeFactory.CreateNode(XmlNodeType.Element, "parceluuid", ""); + node.InnerText = land.LandData.GlobalID.ToString(); + xmlobject.AppendChild(node); + } + else + { + // Something is wrong with this object. Let's not list it. + m_log.WarnFormat("[DATASNAPSHOT]: Bad data for object {0} ({1}) in region {2}", obj.Name, obj.UUID, m_scene.RegionInfo.RegionName); + continue; + } node = nodeFactory.CreateNode(XmlNodeType.Element, "location", ""); Vector3 loc = obj.AbsolutePosition; -- cgit v1.1