diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs index 29bcf0bc27..782d5b4323 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs @@ -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