add a null check for Primitive.Sculpt in PrimitiveBaseShape constructor for OpenMetaverse.Primitive object

0.7.4.1
dahlia 2012-05-07 00:33:50 -07:00
parent 4186fa10f0
commit 4032455332
1 changed files with 8 additions and 4 deletions

View File

@ -241,10 +241,14 @@ namespace OpenSim.Framework
m_textureEntry = prim.Textures.GetBytes();
SculptEntry = (prim.Sculpt.Type != OpenMetaverse.SculptType.None);
SculptData = prim.Sculpt.GetBytes();
SculptTexture = prim.Sculpt.SculptTexture;
SculptType = (byte)prim.Sculpt.Type;
if (prim.Sculpt != null)
{
SculptEntry = (prim.Sculpt.Type != OpenMetaverse.SculptType.None);
SculptData = prim.Sculpt.GetBytes();
SculptTexture = prim.Sculpt.SculptTexture;
SculptType = (byte)prim.Sculpt.Type;
}
else SculptType = (byte)OpenMetaverse.SculptType.None;
}
[XmlIgnore]