From 674b521fdd24f10964cc4f256486eca6fd6c2cc9 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 9 Nov 2011 20:21:48 +0000 Subject: In pCampBot, don't try and pull down Primitive faces or sculpts set to null --- OpenSim/Tools/pCampBot/Bot.cs | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'OpenSim/Tools/pCampBot') diff --git a/OpenSim/Tools/pCampBot/Bot.cs b/OpenSim/Tools/pCampBot/Bot.cs index 1b30766..669c99b 100644 --- a/OpenSim/Tools/pCampBot/Bot.cs +++ b/OpenSim/Tools/pCampBot/Bot.cs @@ -447,17 +447,20 @@ namespace pCampBot for (int i = 0; i < prim.Textures.FaceTextures.Length; i++) { - UUID textureID = prim.Textures.FaceTextures[i].TextureID; + Primitive.TextureEntryFace face = prim.Textures.FaceTextures[i]; - if (textureID != UUID.Zero) - GetTexture(textureID); + if (face != null) + { + UUID textureID = prim.Textures.FaceTextures[i].TextureID; + + if (textureID != UUID.Zero) + GetTexture(textureID); + } } } - if (prim.Sculpt.SculptTexture != UUID.Zero) - { + if (prim.Sculpt != null && prim.Sculpt.SculptTexture != UUID.Zero) GetTexture(prim.Sculpt.SculptTexture); - } } } -- cgit v1.1