summaryrefslogtreecommitdiff
path: root/indra/newview/lldrawpoolavatar.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2017-12-08 15:20:28 +0000
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2017-12-08 15:20:28 +0000
commit5cbe0578800c8d9b9c497b08370f23ee1f2c109e (patch)
tree7a30837c3d61f9129257cfb314ff25f1b5078273 /indra/newview/lldrawpoolavatar.cpp
parent0c800002e2bdc81d66eb7f7f7eb76448574edad8 (diff)
SL-838 - prevent deletion of LLDrawPoolAvatar while it still has rigged faces
Diffstat (limited to 'indra/newview/lldrawpoolavatar.cpp')
-rw-r--r--indra/newview/lldrawpoolavatar.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp
index fe830419e0..2830a9d686 100644
--- a/indra/newview/lldrawpoolavatar.cpp
+++ b/indra/newview/lldrawpoolavatar.cpp
@@ -109,6 +109,32 @@ LLDrawPoolAvatar::LLDrawPoolAvatar() :
{
}
+LLDrawPoolAvatar::~LLDrawPoolAvatar()
+{
+ if (!isDead())
+ {
+ LL_WARNS() << "Destroying avatar drawpool that still contains faces" << LL_ENDL;
+ }
+}
+
+// virtual
+BOOL LLDrawPoolAvatar::isDead()
+{
+ if (!LLFacePool::isDead())
+ {
+ return FALSE;
+ }
+
+ for (U32 i = 0; i < NUM_RIGGED_PASSES; ++i)
+ {
+ if (mRiggedFace[i].size() > 0)
+ {
+ return FALSE;
+ }
+ }
+ return TRUE;
+}
+
//-----------------------------------------------------------------------------
// instancePool()
//-----------------------------------------------------------------------------