From 24aedf52c6b903720f588694880e9613b115cc0c Mon Sep 17 00:00:00 2001 From: lbsa71 Date: Fri, 14 Mar 2008 15:28:34 +0000 Subject: * Added null root part guard * Normalized some UUID handling * Compacted a few Contains/Add into Set --- OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (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 47c4567..e295f87 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs @@ -123,7 +123,15 @@ namespace OpenSim.Region.Environment.Scenes public override LLVector3 AbsolutePosition { - get { return m_rootPart.GroupPosition; } + get + { + if( m_rootPart == null ) + { + throw new NullReferenceException(string.Format("Object {0} has no root part.", m_uuid)); + } + + return m_rootPart.GroupPosition; + } set { LLVector3 val = value; -- cgit v1.1