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

@ -2340,11 +2340,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
string appearanceSerialized = LoadNotecard(notecard); string appearanceSerialized = LoadNotecard(notecard);
if (appearanceSerialized != null) if (appearanceSerialized != null)
{
try
{ {
OSDMap appearanceOsd = (OSDMap)OSDParser.DeserializeLLSDXml(appearanceSerialized); OSDMap appearanceOsd = (OSDMap)OSDParser.DeserializeLLSDXml(appearanceSerialized);
appearance = new AvatarAppearance(); appearance = new AvatarAppearance();
appearance.Unpack(appearanceOsd); appearance.Unpack(appearanceOsd);
} }
catch
{
return UUID.Zero.ToString();
}
}
} }
if (appearance == null) if (appearance == null)