Remove pointless cluttering SOP.ParentGroup != null checks.

The only times when ParentGroup might be null is during regression tests (which might not be a valid thing) and when scene objects are being constructed from the database.
At all other times it's not possible for a SOP not to have a SOG parent.
This commit is contained in:
Justin Clark-Casey (justincc)
2011-09-01 01:22:28 +01:00
parent 083ba72b28
commit 095b3e5756
16 changed files with 278 additions and 428 deletions

View File

@@ -85,7 +85,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.BuySell
IClientAPI client, UUID agentID, UUID sessionID, uint localID, byte saleType, int salePrice)
{
SceneObjectPart part = m_scene.GetSceneObjectPart(localID);
if (part == null || part.ParentGroup == null)
if (part == null)
return;
if (part.ParentGroup.IsDeleted)
@@ -111,9 +111,6 @@ namespace OpenSim.Region.CoreModules.World.Objects.BuySell
if (part == null)
return false;
if (part.ParentGroup == null)
return false;
SceneObjectGroup group = part.ParentGroup;
switch (saleType)