From 095b3e5756bb3160b30c9c5670ba008fa13d2e66 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 1 Sep 2011 01:22:28 +0100 Subject: 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. --- OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs') diff --git a/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs b/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs index be399ff..8b78701 100644 --- a/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs +++ b/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs @@ -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) -- cgit v1.1