From f82227a1865e95ebc86a43c732bfd77ef97d3814 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Sun, 23 Mar 2008 07:10:04 +0000 Subject: * Added a little more stability for getting the object list from the parcel box. (previously it crashed my simulator) * Found and gracefully handled a few situations where null references occur. (m_rootPart again!) --- OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs') diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs index 1e63ae7..2875874 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs @@ -161,7 +161,14 @@ namespace OpenSim.Region.Environment.Scenes public override uint LocalId { - get { return m_rootPart.LocalId; } + get { + if (m_rootPart == null) + { + m_log.Error("[PRIMGROUP]: Unable to find the rootpart for a LocalId Request!"); + return 0; + } + + return m_rootPart.LocalId; } set { m_rootPart.LocalId = value; } } @@ -173,7 +180,12 @@ namespace OpenSim.Region.Environment.Scenes public LLUUID OwnerID { - get { return m_rootPart.OwnerID; } + get { + if (m_rootPart == null) + return LLUUID.Zero; + + return m_rootPart.OwnerID; + } set { m_rootPart.OwnerID = value; } } -- cgit v1.1