Fix a possible NRE

avinationmerge
Melanie 2012-09-28 00:15:14 +02:00
parent a0065ad616
commit 7e21ddeeff
1 changed files with 10 additions and 3 deletions

View File

@ -2341,9 +2341,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
if (appearanceSerialized != null)
{
OSDMap appearanceOsd = (OSDMap)OSDParser.DeserializeLLSDXml(appearanceSerialized);
appearance = new AvatarAppearance();
appearance.Unpack(appearanceOsd);
try
{
OSDMap appearanceOsd = (OSDMap)OSDParser.DeserializeLLSDXml(appearanceSerialized);
appearance = new AvatarAppearance();
appearance.Unpack(appearanceOsd);
}
catch
{
return UUID.Zero.ToString();
}
}
}