From 739bb1dc4362dc17439a17f0ad3282744fbf1df3 Mon Sep 17 00:00:00 2001 From: "Huaiyu (Kitty) Liu" Date: Fri, 7 Jan 2011 12:00:00 -0800 Subject: [PATCH] Fixed a bug in deserialization during rezzing objects out of inventory: SceneObjecPart.SyncInfoUpdate() fixed. --- OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 566962580f..dfc752a4e8 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -4922,7 +4922,7 @@ namespace OpenSim.Region.Framework.Scenes //The ID the identifies which actor has caused the most recent update to the prim. //We use type "string" for the ID only to make it human-readable. - private string m_lastUpdateActorID; + private string m_lastUpdateActorID=""; public string LastUpdateActorID { get { return m_lastUpdateActorID; } @@ -4948,12 +4948,12 @@ namespace OpenSim.Region.Framework.Scenes public void SyncInfoUpdate() { - if (m_parentGroup.Scene.ActorSyncModule == null || m_parentGroup.Scene.ActorSyncModule.ActorID == null) - return; + //if (m_parentGroup == null || m_parentGroup.Scene==null || m_parentGroup.Scene.ActorSyncModule == null || m_parentGroup.Scene.ActorSyncModule.ActorID == null) + // return; //Trick: calling UpdateTimestamp here makes sure that when an object was received and de-serialized, before // its parts are linked together, neither TimeStamp or ActorID will be modified. This is because during de-serialization, // ScheduleFullUpdate() is called when m_parentGroup == null - if (m_parentGroup != null) + if (m_parentGroup != null && m_parentGroup.Scene != null && m_parentGroup.Scene.ActorSyncModule!=null) { UpdateTimestamp(); m_lastUpdateActorID = m_parentGroup.Scene.ActorSyncModule.ActorID;