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.httptests
parent
4320758d97
commit
fa5bf4fd0b
|
@ -1361,7 +1361,8 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
|
|||
|
||||
private static void ProcessShpMedia(PrimitiveBaseShape shp, XmlReader reader)
|
||||
{
|
||||
string value = reader.ReadElementContentAsString("Media", String.Empty);
|
||||
// Get inner XML and pass to MediaList parser
|
||||
string value = reader.ReadInnerXml();
|
||||
shp.Media = PrimitiveBaseShape.MediaList.FromXml(value);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue