From 6bc76860d185ba6296f268373ccfea6375fff611 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sat, 5 Nov 2016 23:56:55 +0000 Subject: avoid a null ref, few changes to udp updates send --- OpenSim/Region/OptionalModules/DataSnapshot/LandSnapshot.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/OptionalModules/DataSnapshot') diff --git a/OpenSim/Region/OptionalModules/DataSnapshot/LandSnapshot.cs b/OpenSim/Region/OptionalModules/DataSnapshot/LandSnapshot.cs index b8c90cd..5c791e6 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) { -- cgit v1.1