dont fail saving a OAR because of a broken material

0.9.0-post-fixes
UbitUmarov 2017-05-23 04:21:03 +01:00
parent f3eb73926e
commit e69057a1b6
1 changed files with 10 additions and 1 deletions

View File

@ -550,7 +550,16 @@ namespace OpenSim.Region.Framework.Scenes
/// </summary> /// </summary>
private void RecordMaterialAssetUuids(AssetBase materialAsset) private void RecordMaterialAssetUuids(AssetBase materialAsset)
{ {
OSDMap mat = (OSDMap)OSDParser.DeserializeLLSDXml(materialAsset.Data); OSDMap mat;
try
{
mat = (OSDMap)OSDParser.DeserializeLLSDXml(materialAsset.Data);
}
catch (Exception e)
{
m_log.WarnFormat("[Materials]: cannot decode material asset {0}: {1}", materialAsset.ID, e.Message);
return;
}
UUID normMap = mat["NormMap"].AsUUID(); UUID normMap = mat["NormMap"].AsUUID();
if (normMap != UUID.Zero) if (normMap != UUID.Zero)