diff options
author | Justin Clark-Casey (justincc) | 2012-01-11 14:33:26 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-01-11 14:33:26 +0000 |
commit | 38db87475528f48752623fcb7e8b40ef728f50e9 (patch) | |
tree | 896b2cd651e47860560d74256016cfbdee9eb0f1 /OpenSim | |
parent | Add a check to see if an asset exists before recreating it while (diff) | |
download | opensim-SC_OLD-38db87475528f48752623fcb7e8b40ef728f50e9.zip opensim-SC_OLD-38db87475528f48752623fcb7e8b40ef728f50e9.tar.gz opensim-SC_OLD-38db87475528f48752623fcb7e8b40ef728f50e9.tar.bz2 opensim-SC_OLD-38db87475528f48752623fcb7e8b40ef728f50e9.tar.xz |
If deserializing a scene object fails during IAR load then ignore the object rather than halting the IAR load with an exception.
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs | 5 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs index 6b24718..ee10d04 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs | |||
@@ -493,7 +493,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
493 | } | 493 | } |
494 | else | 494 | else |
495 | { | 495 | { |
496 | sceneObjects.Add(SceneObjectSerializer.FromOriginalXmlFormat(xmlData)); | 496 | SceneObjectGroup deserializedObject = SceneObjectSerializer.FromOriginalXmlFormat(xmlData); |
497 | |||
498 | if (deserializedObject != null) | ||
499 | sceneObjects.Add(deserializedObject); | ||
497 | } | 500 | } |
498 | 501 | ||
499 | foreach (SceneObjectGroup sog in sceneObjects) | 502 | foreach (SceneObjectGroup sog in sceneObjects) |
diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs index bca49f7..38d1231 100644 --- a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs +++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs | |||
@@ -54,7 +54,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
54 | /// Deserialize a scene object from the original xml format | 54 | /// Deserialize a scene object from the original xml format |
55 | /// </summary> | 55 | /// </summary> |
56 | /// <param name="xmlData"></param> | 56 | /// <param name="xmlData"></param> |
57 | /// <returns></returns> | 57 | /// <returns>The scene object deserialized. Null on failure.</returns> |
58 | public static SceneObjectGroup FromOriginalXmlFormat(string xmlData) | 58 | public static SceneObjectGroup FromOriginalXmlFormat(string xmlData) |
59 | { | 59 | { |
60 | //m_log.DebugFormat("[SOG]: Starting deserialization of SOG"); | 60 | //m_log.DebugFormat("[SOG]: Starting deserialization of SOG"); |