Attempt to fix mantis #741, could not replicate it myself. But the error was suggesting that the SceneObjectPart was null, so added a null check, to make sure the sceneobject to be attached is found before attempting the attachment.

0.6.0-stable
MW 2008-03-14 15:23:33 +00:00
parent 923cc9f62f
commit 7ab08f2ac4
1 changed files with 121 additions and 114 deletions

View File

@ -290,6 +290,8 @@ namespace OpenSim.Region.Environment.Scenes
{
System.Console.WriteLine("Attaching object " + objectLocalID + " to " + AttachmentPt);
SceneObjectPart p = GetSceneObjectPart(objectLocalID);
if (p != null)
{
ScenePresence av = null;
if (TryGetAvatar(remoteClient.AgentId, out av))
{
@ -426,6 +428,11 @@ namespace OpenSim.Region.Environment.Scenes
m_log.Info("[SCENE]: Avatar " + remoteClient.AgentId + " not found");
}
}
else
{
m_log.Info("[SCENE]: Attempting to attach object; Object " + objectLocalID + "(localID) not found");
}
}
public ScenePresence CreateAndAddScenePresence(IClientAPI client, bool child, AvatarAppearance appearance)