diff options
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs index 3d90fa6..3b13e3f 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | |||
@@ -779,7 +779,15 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
779 | // on detach. It's likely a temp attachment. | 779 | // on detach. It's likely a temp attachment. |
780 | if (so.FromItemID != UUID.Zero) | 780 | if (so.FromItemID != UUID.Zero) |
781 | { | 781 | { |
782 | sp.RemoveAttachment(so); | 782 | lock (sp.AttachmentsSyncLock) |
783 | { | ||
784 | bool changed = sp.Appearance.DetachAttachment(so.FromItemID); | ||
785 | if (changed && m_scene.AvatarFactory != null) | ||
786 | m_scene.AvatarFactory.QueueAppearanceSave(sp.UUID); | ||
787 | |||
788 | sp.RemoveAttachment(so); | ||
789 | } | ||
790 | |||
783 | m_scene.DeleteSceneObject(so, false, false); | 791 | m_scene.DeleteSceneObject(so, false, false); |
784 | so.RemoveScriptInstances(true); | 792 | so.RemoveScriptInstances(true); |
785 | so.Clear(); | 793 | so.Clear(); |