From ae2ceda479a2b223189b5eecedc46798e1152fcd Mon Sep 17 00:00:00 2001 From: John Hurliman Date: Wed, 19 Aug 2009 12:41:57 -0700 Subject: * Only update TextureEntry in AvatarAppearance if the incoming XML-RPC has a valid TextureEntry. About half the time update_avatar_appearance calls are made, the TextureEntry is empty --- OpenSim/Framework/AvatarAppearance.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'OpenSim') diff --git a/OpenSim/Framework/AvatarAppearance.cs b/OpenSim/Framework/AvatarAppearance.cs index 7270f32..1fb01ba 100644 --- a/OpenSim/Framework/AvatarAppearance.cs +++ b/OpenSim/Framework/AvatarAppearance.cs @@ -503,7 +503,14 @@ namespace OpenSim.Framework Owner = new UUID((string)h["owner"]); Serial = Convert.ToInt32((string)h["serial"]); VisualParams = (byte[])h["visual_params"]; - Texture = new Primitive.TextureEntry((byte[])h["texture"], 0, ((byte[])h["texture"]).Length); + + if (h.Contains("texture")) + { + byte[] te = h["texture"] as byte[]; + if (te != null && te.Length > 0) + Texture = new Primitive.TextureEntry(te, 0, te.Length); + } + AvatarHeight = (float)Convert.ToDouble((string)h["avatar_height"]); m_wearables = new AvatarWearable[MAX_WEARABLES]; -- cgit v1.1