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.