diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2020-02-04 13:12:38 +0000 |
---|---|---|
committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2020-02-04 13:12:38 +0000 |
commit | 0e7ab122ec0761ca0a82251d63a7367e7147f4be (patch) | |
tree | e0c1d1e1307f55b5de30e880d2ac4a0f4aa09deb /indra/newview/llface.cpp | |
parent | 98f4cd3434d8f3524b114cccad9cb4e888d76332 (diff) |
SL-10908 LLFace should fully rely onto drawable
Diffstat (limited to 'indra/newview/llface.cpp')
-rw-r--r-- | indra/newview/llface.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index 85ee33edb1..5539cfb5df 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -183,6 +183,7 @@ void LLFace::destroy() if(mTexture[i].notNull()) { mTexture[i]->removeFace(i, this) ; + mTexture[i] = NULL; } } @@ -202,7 +203,6 @@ void LLFace::destroy() { mDrawPoolp->removeFace(this); } - mDrawPoolp = NULL; } @@ -211,7 +211,7 @@ void LLFace::destroy() delete mTextureMatrix; mTextureMatrix = NULL; - if (mDrawablep.notNull()) + if (mDrawablep) { LLSpatialGroup* group = mDrawablep->getSpatialGroup(); if (group) @@ -223,7 +223,7 @@ void LLFace::destroy() } setDrawInfo(NULL); - + mDrawablep = NULL; mVObjp = NULL; } @@ -529,7 +529,7 @@ void LLFace::updateCenterAgent() void LLFace::renderSelected(LLViewerTexture *imagep, const LLColor4& color) { - if (mDrawablep->getSpatialGroup() == NULL) + if (mDrawablep == NULL || mDrawablep->getSpatialGroup() == NULL) { return; } @@ -537,7 +537,7 @@ void LLFace::renderSelected(LLViewerTexture *imagep, const LLColor4& color) mDrawablep->getSpatialGroup()->rebuildGeom(); mDrawablep->getSpatialGroup()->rebuildMesh(); - if(mDrawablep.isNull() || mVertexBuffer.isNull()) + if(mVertexBuffer.isNull()) { return; } @@ -2668,7 +2668,7 @@ S32 LLFace::renderElements(const U16 *index_array) const S32 LLFace::renderIndexed() { - if(mDrawablep.isNull() || mDrawPoolp == NULL) + if(mDrawablep == NULL || mDrawPoolp == NULL) { return 0; } |