From 674b521fdd24f10964cc4f256486eca6fd6c2cc9 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Wed, 9 Nov 2011 20:21:48 +0000 Subject: [PATCH] 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(-) diff --git a/OpenSim/Tools/pCampBot/Bot.cs b/OpenSim/Tools/pCampBot/Bot.cs index 1b30766ef0..669c99b7f6 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); - } } }