If deserializing a scene object fails during IAR load then ignore the object rather than halting the IAR load with an exception.

iar_mods
Justin Clark-Casey (justincc) 2012-01-11 14:33:26 +00:00
parent 5f7e392c7c
commit 38db874755
2 changed files with 5 additions and 2 deletions

View File

@ -493,7 +493,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
} }
else else
{ {
sceneObjects.Add(SceneObjectSerializer.FromOriginalXmlFormat(xmlData)); SceneObjectGroup deserializedObject = SceneObjectSerializer.FromOriginalXmlFormat(xmlData);
if (deserializedObject != null)
sceneObjects.Add(deserializedObject);
} }
foreach (SceneObjectGroup sog in sceneObjects) foreach (SceneObjectGroup sog in sceneObjects)

View File

@ -54,7 +54,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
/// Deserialize a scene object from the original xml format /// Deserialize a scene object from the original xml format
/// </summary> /// </summary>
/// <param name="xmlData"></param> /// <param name="xmlData"></param>
/// <returns></returns> /// <returns>The scene object deserialized. Null on failure.</returns>
public static SceneObjectGroup FromOriginalXmlFormat(string xmlData) public static SceneObjectGroup FromOriginalXmlFormat(string xmlData)
{ {
//m_log.DebugFormat("[SOG]: Starting deserialization of SOG"); //m_log.DebugFormat("[SOG]: Starting deserialization of SOG");