diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 719f2da..fc89473 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -3509,12 +3509,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3509 | public void RemoveAttachment(SceneObjectGroup gobj) | 3509 | public void RemoveAttachment(SceneObjectGroup gobj) |
3510 | { | 3510 | { |
3511 | lock (m_attachments) | 3511 | lock (m_attachments) |
3512 | { | 3512 | m_attachments.Remove(gobj); |
3513 | if (m_attachments.Contains(gobj)) | ||
3514 | { | ||
3515 | m_attachments.Remove(gobj); | ||
3516 | } | ||
3517 | } | ||
3518 | } | 3513 | } |
3519 | 3514 | ||
3520 | public bool ValidateAttachments() | 3515 | public bool ValidateAttachments() |
@@ -3525,12 +3520,22 @@ namespace OpenSim.Region.Framework.Scenes | |||
3525 | foreach (SceneObjectGroup gobj in m_attachments) | 3520 | foreach (SceneObjectGroup gobj in m_attachments) |
3526 | { | 3521 | { |
3527 | if (gobj == null) | 3522 | if (gobj == null) |
3523 | { | ||
3524 | m_log.WarnFormat( | ||
3525 | "[SCENE PRESENCE]: Failed to validate an attachment for {0} since it was null", Name); | ||
3528 | return false; | 3526 | return false; |
3527 | } | ||
3529 | 3528 | ||
3530 | if (gobj.IsDeleted) | 3529 | if (gobj.IsDeleted) |
3530 | { | ||
3531 | m_log.WarnFormat( | ||
3532 | "[SCENE PRESENCE]: Failed to validate attachment {0} {1} for {2} since it had been deleted", | ||
3533 | gobj.Name, gobj.UUID, Name); | ||
3531 | return false; | 3534 | return false; |
3535 | } | ||
3532 | } | 3536 | } |
3533 | } | 3537 | } |
3538 | |||
3534 | return true; | 3539 | return true; |
3535 | } | 3540 | } |
3536 | 3541 | ||
@@ -3804,9 +3809,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
3804 | List<AvatarAttachment> attachments = m_appearance.GetAttachments(); | 3809 | List<AvatarAttachment> attachments = m_appearance.GetAttachments(); |
3805 | foreach (AvatarAttachment attach in attachments) | 3810 | foreach (AvatarAttachment attach in attachments) |
3806 | { | 3811 | { |
3807 | if (m_isDeleted) | ||
3808 | return; | ||
3809 | |||
3810 | int p = attach.AttachPoint; | 3812 | int p = attach.AttachPoint; |
3811 | UUID itemID = attach.ItemID; | 3813 | UUID itemID = attach.ItemID; |
3812 | 3814 | ||