diff options
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs index 6555b54..dd7d831 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | |||
@@ -264,8 +264,17 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
264 | if (AttachmentPt != 0 && AttachmentPt != objatt.GetAttachmentPoint()) | 264 | if (AttachmentPt != 0 && AttachmentPt != objatt.GetAttachmentPoint()) |
265 | tainted = true; | 265 | tainted = true; |
266 | 266 | ||
267 | AttachObject(remoteClient, objatt, AttachmentPt, false); | 267 | // This will throw if the attachment fails |
268 | //objatt.ScheduleGroupForFullUpdate(); | 268 | try |
269 | { | ||
270 | AttachObject(remoteClient, objatt, AttachmentPt, false); | ||
271 | } | ||
272 | catch | ||
273 | { | ||
274 | // Make sure the object doesn't stick around and bail | ||
275 | m_scene.DeleteSceneObject(objatt, false); | ||
276 | return null; | ||
277 | } | ||
269 | 278 | ||
270 | if (tainted) | 279 | if (tainted) |
271 | objatt.HasGroupChanged = true; | 280 | objatt.HasGroupChanged = true; |
@@ -594,4 +603,4 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
594 | so.HasGroupChanged = false; | 603 | so.HasGroupChanged = false; |
595 | } | 604 | } |
596 | } | 605 | } |
597 | } \ No newline at end of file | 606 | } |