summaryrefslogtreecommitdiff
path: root/indra/newview/lldrawpoolavatar.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2020-03-27 16:22:51 +0200
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2020-03-27 16:36:31 +0200
commit764cb898921baafb7c948451660183f39c789e0c (patch)
tree10151725748c97a3d68226491ee6ec0c1b3e0762 /indra/newview/lldrawpoolavatar.cpp
parent33633361a37c4b25589e8a4ec34c733a206a8301 (diff)
SL-12824 Imported fix for crash
For "Face with no texture index references indexed texture draw info"
Diffstat (limited to 'indra/newview/lldrawpoolavatar.cpp')
-rw-r--r--indra/newview/lldrawpoolavatar.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp
index 63abadbcf4..3d3d75c5eb 100644
--- a/indra/newview/lldrawpoolavatar.cpp
+++ b/indra/newview/lldrawpoolavatar.cpp
@@ -1604,11 +1604,16 @@ void LLDrawPoolAvatar::getRiggedGeometry(
LLVolume* volume,
const LLVolumeFace& vol_face)
{
- face->setGeomIndex(0);
- face->setIndicesIndex(0);
-
- //rigged faces do not batch textures
- face->setTextureIndex(255);
+ face->setGeomIndex(0);
+ face->setIndicesIndex(0);
+
+ if (face->getTextureIndex() != FACE_DO_NOT_BATCH_TEXTURES)
+ {
+ face->setDrawInfo(NULL);
+ }
+
+ //rigged faces do not batch textures
+ face->setTextureIndex(FACE_DO_NOT_BATCH_TEXTURES);
if (buffer.isNull() || buffer->getTypeMask() != data_mask || !buffer->isWriteable())
{