From 7e21ddeeff8cbe7a715c0b2e4fc6bbd47e1160d8 Mon Sep 17 00:00:00 2001 From: Melanie Date: Fri, 28 Sep 2012 00:15:14 +0200 Subject: Fix a possible NRE --- .../ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/ScriptEngine/Shared') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 2f02f1f..80111f9 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs @@ -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(); + } } } -- cgit v1.1