catch a null case in the convenience RegionID property

0.6.0-stable
Sean Dague 2008-07-23 22:14:35 +00:00
parent 30a77b5b9f
commit c38b811f5d
1 changed files with 7 additions and 1 deletions

View File

@ -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
}