Fix yet another cause of "Ghost attachments"

This commit is contained in:
Melanie Thielker
2010-09-06 21:59:52 +02:00
committed by Melanie
parent 0246edc2ea
commit 36cb6208b5

View File

@@ -264,8 +264,17 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
if (AttachmentPt != 0 && AttachmentPt != objatt.GetAttachmentPoint())
tainted = true;
AttachObject(remoteClient, objatt, AttachmentPt, false);
//objatt.ScheduleGroupForFullUpdate();
// This will throw if the attachment fails
try
{
AttachObject(remoteClient, objatt, AttachmentPt, false);
}
catch
{
// Make sure the object doesn't stick around and bail
m_scene.DeleteSceneObject(objatt, false);
return null;
}
if (tainted)
objatt.HasGroupChanged = true;
@@ -594,4 +603,4 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
so.HasGroupChanged = false;
}
}
}
}