From dd6f560c05caafed740de037eb2b76fcf3924a4a Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Wed, 11 Feb 2015 00:53:56 +0000 Subject: [PATCH] If serialized scene object XML has a SavedScriptState with no UUID, then read past the innerXML instead of wrongly continously looping on the same element. Addresses http://opensimulator.org/mantis/view.php?id=7437 --- OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 20fe3cef11..0a1a226c36 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs @@ -924,13 +924,17 @@ namespace OpenSim.Region.Framework.Scenes string uuid = reader.GetAttribute("UUID"); + // Even if there is no UUID attribute for some strange reason, we must always read the inner XML + // so we don't continually keep checking the same SavedScriptedState element. + string innerXml = reader.ReadInnerXml(); + if (uuid != null) { // m_log.DebugFormat("[SCENE OBJECT GROUP]: Found state for item ID {0} in object {1}", uuid, Name); UUID itemid = new UUID(uuid); if (itemid != UUID.Zero) - m_savedScriptState[itemid] = reader.ReadInnerXml(); + m_savedScriptState[itemid] = innerXml; } else {