From 5e4d6cab00cb29cd088ab7b62ab13aff103b64cb Mon Sep 17 00:00:00 2001 From: onefang Date: Sun, 19 May 2019 21:24:15 +1000 Subject: Dump OpenSim 0.9.0.1 into it's own branch. --- OpenSim/Region/OptionalModules/DataSnapshot/LandSnapshot.cs | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/OptionalModules/DataSnapshot/LandSnapshot.cs') diff --git a/OpenSim/Region/OptionalModules/DataSnapshot/LandSnapshot.cs b/OpenSim/Region/OptionalModules/DataSnapshot/LandSnapshot.cs index b8c90cd..8e6a30e 100644 --- a/OpenSim/Region/OptionalModules/DataSnapshot/LandSnapshot.cs +++ b/OpenSim/Region/OptionalModules/DataSnapshot/LandSnapshot.cs @@ -120,12 +120,15 @@ namespace OpenSim.Region.DataSnapshot.Providers public XmlNode RequestSnapshotData(XmlDocument nodeFactory) { + XmlNode parent = nodeFactory.CreateNode(XmlNodeType.Element, "parceldata", ""); ILandChannel landChannel = m_scene.LandChannel; + if(landChannel == null) + return parent; + List parcels = landChannel.AllParcels(); IDwellModule dwellModule = m_scene.RequestModuleInterface(); - XmlNode parent = nodeFactory.CreateNode(XmlNodeType.Element, "parceldata", ""); if (parcels != null) { @@ -140,7 +143,7 @@ namespace OpenSim.Region.DataSnapshot.Providers LandData parcel = land.LandData; if (m_parent.ExposureLevel.Equals("all") || - (m_parent.ExposureLevel.Equals("minimum") && + (m_parent.ExposureLevel.Equals("minimum") && (parcel.Flags & (uint)ParcelFlags.ShowDirectory) == (uint)ParcelFlags.ShowDirectory)) { @@ -265,8 +268,12 @@ namespace OpenSim.Region.DataSnapshot.Providers { XmlNode username = nodeFactory.CreateNode(XmlNodeType.Element, "name", ""); UserAccount account = m_scene.UserAccountService.GetUserAccount(m_scene.RegionInfo.ScopeID, userOwnerUUID); - username.InnerText = account.FirstName + " " + account.LastName; + if(account != null) + username.InnerText = account.FirstName + " " + account.LastName; + else + username.InnerText = "UnKnown"; userblock.AppendChild(username); + } catch (Exception) { -- cgit v1.1