From 202533c8edb495e19f16557ac3c244d0d8699e15 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Sat, 17 Jan 2015 00:08:16 +0000 Subject: [PATCH] minor: In AttachmentsModule.UpdateKnownItem use the existing IInventoryAccessModule reference that other methods are already using rather than fetching its own copy. --- .../CoreModules/Avatar/Attachments/AttachmentsModule.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs index 4af4ddb32c..8705dd57af 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs @@ -795,9 +795,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments Utils.StringToBytes(sceneObjectXml), sp.UUID); - IInventoryAccessModule invAccess = m_scene.RequestModuleInterface(); - - invAccess.UpdateInventoryItemAsset(sp.UUID, item, asset); + if (m_invAccessModule != null) + m_invAccessModule.UpdateInventoryItemAsset(sp.UUID, item, asset); // If the name of the object has been changed whilst attached then we want to update the inventory // item in the viewer.