summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2017-12-08 15:42:29 +0000
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2017-12-08 15:42:29 +0000
commitef264fd82e48a376db3c31323b3fcffe4d9c32b4 (patch)
tree20810ec02be280e93d905cf0eba458ee5a5efbdb /indra
parent6c13bc016aa47354f69a1e4777d9adf3f7a8c14e (diff)
SL-838 - more checking of pool state when adding or removing rigged meshes
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/lldrawpoolavatar.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp
index 2830a9d686..375704adff 100644
--- a/indra/newview/lldrawpoolavatar.cpp
+++ b/indra/newview/lldrawpoolavatar.cpp
@@ -2068,11 +2068,16 @@ LLColor3 LLDrawPoolAvatar::getDebugColor() const
void LLDrawPoolAvatar::addRiggedFace(LLFace* facep, U32 type)
{
+ llassert (facep->isState(LLFace::RIGGED));
+ llassert(getType() == LLDrawPool::POOL_AVATAR);
+ if (facep->getPool() && facep->getPool() != this)
+ {
+ LL_ERRS() << "adding rigged face that's already in another pool" << LL_ENDL;
+ }
if (type >= NUM_RIGGED_PASSES)
{
LL_ERRS() << "Invalid rigged face type." << LL_ENDL;
}
-
if (facep->getRiggedIndex(type) != -1)
{
LL_ERRS() << "Tried to add a rigged face that's referenced elsewhere." << LL_ENDL;
@@ -2085,6 +2090,12 @@ void LLDrawPoolAvatar::addRiggedFace(LLFace* facep, U32 type)
void LLDrawPoolAvatar::removeRiggedFace(LLFace* facep)
{
+ llassert (facep->isState(LLFace::RIGGED));
+ llassert(getType() == LLDrawPool::POOL_AVATAR);
+ if (facep->getPool() != this)
+ {
+ LL_ERRS() << "Tried to remove a rigged face from the wrong pool" << LL_ENDL;
+ }
facep->setPool(NULL);
for (U32 i = 0; i < NUM_RIGGED_PASSES; ++i)