diff options
Diffstat (limited to 'OpenSim/Region/OptionalModules/DataSnapshot/LandSnapshot.cs')
-rw-r--r-- | OpenSim/Region/OptionalModules/DataSnapshot/LandSnapshot.cs | 13 |
1 files changed, 10 insertions, 3 deletions
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 | |||
120 | 120 | ||
121 | public XmlNode RequestSnapshotData(XmlDocument nodeFactory) | 121 | public XmlNode RequestSnapshotData(XmlDocument nodeFactory) |
122 | { | 122 | { |
123 | XmlNode parent = nodeFactory.CreateNode(XmlNodeType.Element, "parceldata", ""); | ||
123 | ILandChannel landChannel = m_scene.LandChannel; | 124 | ILandChannel landChannel = m_scene.LandChannel; |
125 | if(landChannel == null) | ||
126 | return parent; | ||
127 | |||
124 | List<ILandObject> parcels = landChannel.AllParcels(); | 128 | List<ILandObject> parcels = landChannel.AllParcels(); |
125 | 129 | ||
126 | IDwellModule dwellModule = m_scene.RequestModuleInterface<IDwellModule>(); | 130 | IDwellModule dwellModule = m_scene.RequestModuleInterface<IDwellModule>(); |
127 | 131 | ||
128 | XmlNode parent = nodeFactory.CreateNode(XmlNodeType.Element, "parceldata", ""); | ||
129 | if (parcels != null) | 132 | if (parcels != null) |
130 | { | 133 | { |
131 | 134 | ||
@@ -140,7 +143,7 @@ namespace OpenSim.Region.DataSnapshot.Providers | |||
140 | 143 | ||
141 | LandData parcel = land.LandData; | 144 | LandData parcel = land.LandData; |
142 | if (m_parent.ExposureLevel.Equals("all") || | 145 | if (m_parent.ExposureLevel.Equals("all") || |
143 | (m_parent.ExposureLevel.Equals("minimum") && | 146 | (m_parent.ExposureLevel.Equals("minimum") && |
144 | (parcel.Flags & (uint)ParcelFlags.ShowDirectory) == (uint)ParcelFlags.ShowDirectory)) | 147 | (parcel.Flags & (uint)ParcelFlags.ShowDirectory) == (uint)ParcelFlags.ShowDirectory)) |
145 | { | 148 | { |
146 | 149 | ||
@@ -265,8 +268,12 @@ namespace OpenSim.Region.DataSnapshot.Providers | |||
265 | { | 268 | { |
266 | XmlNode username = nodeFactory.CreateNode(XmlNodeType.Element, "name", ""); | 269 | XmlNode username = nodeFactory.CreateNode(XmlNodeType.Element, "name", ""); |
267 | UserAccount account = m_scene.UserAccountService.GetUserAccount(m_scene.RegionInfo.ScopeID, userOwnerUUID); | 270 | UserAccount account = m_scene.UserAccountService.GetUserAccount(m_scene.RegionInfo.ScopeID, userOwnerUUID); |
268 | username.InnerText = account.FirstName + " " + account.LastName; | 271 | if(account != null) |
272 | username.InnerText = account.FirstName + " " + account.LastName; | ||
273 | else | ||
274 | username.InnerText = "UnKnown"; | ||
269 | userblock.AppendChild(username); | 275 | userblock.AppendChild(username); |
276 | |||
270 | } | 277 | } |
271 | catch (Exception) | 278 | catch (Exception) |
272 | { | 279 | { |