* Fixed null reference exception when rezzing an object from inventory with a rootpart that isn't found. Added a way to tell if it's an attachment.

0.6.0-stable
Teravus Ovares 2008-05-11 13:30:47 +00:00
parent efc680f45b
commit 8f26427055
1 changed files with 14 additions and 1 deletions

View File

@ -1308,7 +1308,20 @@ namespace OpenSim.Region.Environment.Scenes
group.SetFromAssetID(itemID);
}
SceneObjectPart rootPart = group.GetChildPart(group.UUID);
SceneObjectPart rootPart = null;
try
{
rootPart = group.GetChildPart(group.UUID);
}
catch (NullReferenceException)
{
string isAttachment = "";
if (attachment)
isAttachment = " Object was an attachment";
m_log.Error("[OJECTREZ]: Error rezzing ItemID: " + itemID + " object has no rootpart." + isAttachment);
}
// Since renaming the item in the inventory does not affect the name stored
// in the serialization, transfer the correct name from the inventory to the