diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2017-12-08 15:20:28 +0000 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2017-12-08 15:20:28 +0000 |
commit | 5cbe0578800c8d9b9c497b08370f23ee1f2c109e (patch) | |
tree | 7a30837c3d61f9129257cfb314ff25f1b5078273 /indra/newview/lldrawpoolavatar.cpp | |
parent | 0c800002e2bdc81d66eb7f7f7eb76448574edad8 (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.cpp | 26 |
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() //----------------------------------------------------------------------------- |