diff options
author | Robert Adams | 2017-06-04 20:51:56 -0700 |
---|---|---|
committer | Robert Adams | 2017-06-04 20:51:56 -0700 |
commit | fa5bf4fd0bb6a855eacdb7b5eec9cd71ad9bf606 (patch) | |
tree | 473a9888ef86a256e6e36d56af167ba2037f978b /OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs | |
parent | remove redundant UpdateMovementAnimations(); (diff) | |
download | opensim-SC-fa5bf4fd0bb6a855eacdb7b5eec9cd71ad9bf606.zip opensim-SC-fa5bf4fd0bb6a855eacdb7b5eec9cd71ad9bf606.tar.gz opensim-SC-fa5bf4fd0bb6a855eacdb7b5eec9cd71ad9bf606.tar.bz2 opensim-SC-fa5bf4fd0bb6a855eacdb7b5eec9cd71ad9bf606.tar.xz |
Correct parsing of 'Media' XML element in PrimitiveBaseShape when reading an OAR file.
The code used to call Serializer.ReadElementContentAsString() and then expected to
pass the XML to PrimitiveBaseShape.FromXml to parse. This would throw as
ReadElementContentAsString does not allow any children of the element.
Reading with Serializer.ReadInnerXml() was the fix.
This was only not a problem because most often shapes don't have media and
most simulators don't output anything if the media array is empty.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs index 892403b..b1b1fc5 100644 --- a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs +++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs | |||
@@ -1361,7 +1361,8 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
1361 | 1361 | ||
1362 | private static void ProcessShpMedia(PrimitiveBaseShape shp, XmlReader reader) | 1362 | private static void ProcessShpMedia(PrimitiveBaseShape shp, XmlReader reader) |
1363 | { | 1363 | { |
1364 | string value = reader.ReadElementContentAsString("Media", String.Empty); | 1364 | // Get inner XML and pass to MediaList parser |
1365 | string value = reader.ReadInnerXml(); | ||
1365 | shp.Media = PrimitiveBaseShape.MediaList.FromXml(value); | 1366 | shp.Media = PrimitiveBaseShape.MediaList.FromXml(value); |
1366 | } | 1367 | } |
1367 | 1368 | ||