From debc780654dba27acdef0de384d0db4b586b02be Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Mon, 5 Jul 2010 07:14:32 -0700 Subject: [PATCH] Fixes additional bug reported in mantis #4841. --- .../InventoryAccess/HGInventoryAccessModule.cs | 5 +++-- .../Inventory/HGInventoryBroker.cs | 12 ++++++------ 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs index cd66af5b31..8ccc941c18 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs @@ -131,7 +131,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess return ret; } - // DO NOT OVERRIDE THIS METHOD + // DO NOT OVERRIDE THE BASE METHOD public virtual UUID DeleteToInventory(DeRezAction action, UUID folderID, SceneObjectGroup objectGroup, IClientAPI remoteClient) { @@ -139,7 +139,8 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess if (!assetID.Equals(UUID.Zero)) { - UploadInventoryItem(remoteClient.AgentId, assetID, "", 0); + if (remoteClient != null) + UploadInventoryItem(remoteClient.AgentId, assetID, "", 0); } else m_log.Debug("[HGScene]: Scene.Inventory did not create asset"); diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs index e09db154aa..4ec5253e58 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs @@ -202,9 +202,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory } } } - - // else put a null; it means that the methods should forward to local grid's inventory - m_InventoryURLs.Add(userID, null); } private void DropInventoryServiceURL(UUID userID) @@ -223,10 +220,13 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory if (m_InventoryURLs.ContainsKey(userID)) return m_InventoryURLs[userID]; - else - CacheInventoryServiceURL(userID); + CacheInventoryServiceURL(userID); - return m_InventoryURLs[userID]; + if (m_InventoryURLs.ContainsKey(userID)) + return m_InventoryURLs[userID]; + + return null; //it means that the methods should forward to local grid's inventory + } #endregion