diff options
author | Teravus Ovares | 2008-05-11 13:30:47 +0000 |
---|---|---|
committer | Teravus Ovares | 2008-05-11 13:30:47 +0000 |
commit | 8f26427055eaa72197b38f450c47cd95ad3463c2 (patch) | |
tree | 70f8c4226e49fccc58d0e9bfe9842034edc37bfe /OpenSim/Region/Environment | |
parent | * Changed implicit string conversion to LSL_Types.LSLString in money event of... (diff) | |
download | opensim-SC-8f26427055eaa72197b38f450c47cd95ad3463c2.zip opensim-SC-8f26427055eaa72197b38f450c47cd95ad3463c2.tar.gz opensim-SC-8f26427055eaa72197b38f450c47cd95ad3463c2.tar.bz2 opensim-SC-8f26427055eaa72197b38f450c47cd95ad3463c2.tar.xz |
* 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.
Diffstat (limited to 'OpenSim/Region/Environment')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.Inventory.cs | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs index 29bcf0b..782d5b4 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 | |||
1308 | group.SetFromAssetID(itemID); | 1308 | group.SetFromAssetID(itemID); |
1309 | } | 1309 | } |
1310 | 1310 | ||
1311 | SceneObjectPart rootPart = group.GetChildPart(group.UUID); | 1311 | SceneObjectPart rootPart = null; |
1312 | try | ||
1313 | { | ||
1314 | rootPart = group.GetChildPart(group.UUID); | ||
1315 | } | ||
1316 | catch (NullReferenceException) | ||
1317 | { | ||
1318 | string isAttachment = ""; | ||
1319 | |||
1320 | if (attachment) | ||
1321 | isAttachment = " Object was an attachment"; | ||
1322 | |||
1323 | m_log.Error("[OJECTREZ]: Error rezzing ItemID: " + itemID + " object has no rootpart." + isAttachment); | ||
1324 | } | ||
1312 | 1325 | ||
1313 | // Since renaming the item in the inventory does not affect the name stored | 1326 | // Since renaming the item in the inventory does not affect the name stored |
1314 | // in the serialization, transfer the correct name from the inventory to the | 1327 | // in the serialization, transfer the correct name from the inventory to the |