aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-09-01 02:09:41 +0100
committerJustin Clark-Casey (justincc)2011-09-01 02:11:00 +0100
commit7eca929686bd2db1cb42f5c9740fd1d186cdc8b1 (patch)
tree775f07f365acb56bc6043831d5832c2dac468ade /OpenSim/Region/CoreModules
parentrefactor: use ParentGroup.UUID directly instead of SOP.GetRootPartUUID() (diff)
downloadopensim-SC-7eca929686bd2db1cb42f5c9740fd1d186cdc8b1.zip
opensim-SC-7eca929686bd2db1cb42f5c9740fd1d186cdc8b1.tar.gz
opensim-SC-7eca929686bd2db1cb42f5c9740fd1d186cdc8b1.tar.bz2
opensim-SC-7eca929686bd2db1cb42f5c9740fd1d186cdc8b1.tar.xz
Eliminate pointless checks of SOG.RootPart != null
It's never possible for SOG to have no RootPart, except in the first few picosends of the big bang when it's pulled from region persistence or deserialized
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs6
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs2
2 files changed, 1 insertions, 7 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
index 587f35e..ffe76a8 100644
--- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
@@ -470,12 +470,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
470 return; 470 return;
471 } 471 }
472 472
473 if (null == att.RootPart)
474 {
475 m_log.Error("[ATTACHMENTS MODULE]: Unable to save attachment for a prim without the rootpart!");
476 return;
477 }
478
479 InventoryItemBase item = new InventoryItemBase(itemID, sp.UUID); 473 InventoryItemBase item = new InventoryItemBase(itemID, sp.UUID);
480 item = m_scene.InventoryService.GetItem(item); 474 item = m_scene.InventoryService.GetItem(item);
481 bool changed = sp.Appearance.SetAttachment((int)AttachmentPt, itemID, item.AssetID); 475 bool changed = sp.Appearance.SetAttachment((int)AttachmentPt, itemID, item.AssetID);
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
index 82bdf20..766656c 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
@@ -1772,7 +1772,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1772 foreach (SceneObjectGroup gobj in m_attachments) 1772 foreach (SceneObjectGroup gobj in m_attachments)
1773 { 1773 {
1774 // If the prim group is null then something must have happened to it! 1774 // If the prim group is null then something must have happened to it!
1775 if (gobj != null && gobj.RootPart != null) 1775 if (gobj != null)
1776 { 1776 {
1777 // Set the parent localID to 0 so it transfers over properly. 1777 // Set the parent localID to 0 so it transfers over properly.
1778 gobj.RootPart.SetParentLocalId(0); 1778 gobj.RootPart.SetParentLocalId(0);