aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/AvatarAttachment.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/AvatarAttachment.cs15
1 files changed, 11 insertions, 4 deletions
diff --git a/OpenSim/Framework/AvatarAttachment.cs b/OpenSim/Framework/AvatarAttachment.cs
index 07dd385..d8a0ffc 100644
--- a/OpenSim/Framework/AvatarAttachment.cs
+++ b/OpenSim/Framework/AvatarAttachment.cs
@@ -68,11 +68,18 @@ namespace OpenSim.Framework
68 68
69 public void Unpack(OSDMap args) 69 public void Unpack(OSDMap args)
70 { 70 {
71 if (args["point"] != null) 71 OSD tmpOSD;
72 AttachPoint = args["point"].AsInteger(); 72 if (args.TryGetValue("point", out tmpOSD))
73 AttachPoint = tmpOSD.AsInteger();
74 if (args.TryGetValue("item", out tmpOSD))
75 ItemID = tmpOSD.AsUUID();
76 else
77 ItemID = UUID.Zero;
73 78
74 ItemID = (args["item"] != null) ? args["item"].AsUUID() : UUID.Zero; 79 if (args.TryGetValue("asset", out tmpOSD))
75 AssetID = (args["asset"] != null) ? args["asset"].AsUUID() : UUID.Zero; 80 AssetID = tmpOSD.AsUUID();
81 else
82 AssetID = UUID.Zero;
76 } 83 }
77 } 84 }
78} 85}