From c38b811f5d254765886ba745c0d5f50fb03a13be Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Wed, 23 Jul 2008 22:14:35 +0000 Subject: catch a null case in the convenience RegionID property --- OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs index ac7e8a2..f0b1686 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs @@ -923,7 +923,13 @@ namespace OpenSim.Region.Environment.Scenes [XmlIgnore] public virtual LLUUID RegionID { - get { return ParentGroup.Scene.RegionInfo.RegionID; } + get + { + if (ParentGroup != null && ParentGroup.Scene != null) + return ParentGroup.Scene.RegionInfo.RegionID; + else + return LLUUID.Zero; + } set {} // read only } -- cgit v1.1