summaryrefslogtreecommitdiff
path: root/indra/newview/llface.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2012-07-11 15:17:13 -0500
committerDave Parks <davep@lindenlab.com>2012-07-11 15:17:13 -0500
commite86b1c18db0629d64f8bf26fcf69e64072d084e6 (patch)
treeb03cd9e5d28e92561fe2c38179d162c5764ade15 /indra/newview/llface.cpp
parentc0e2d4d988ba6d7d28bfa0487006349266e80709 (diff)
MAINT-794 Fix for assert on loading some types of objects before their parents.
Diffstat (limited to 'indra/newview/llface.cpp')
-rw-r--r--indra/newview/llface.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp
index f5b217d539..4b107ae151 100644
--- a/indra/newview/llface.cpp
+++ b/indra/newview/llface.cpp
@@ -1943,15 +1943,12 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
LLVector4a texIdx;
- U8 index = mTextureIndex < 255 ? mTextureIndex : 0;
+ S32 index = mTextureIndex < 255 ? mTextureIndex : 0;
F32 val = 0.f;
- U8* vp = (U8*) &val;
- vp[0] = index;
- vp[1] = 0;
- vp[2] = 0;
- vp[3] = 0;
-
+ S32* vp = (S32*) &val;
+ *vp = index;
+
llassert(index <= LLGLSLShader::sIndexedTextureChannels-1);
LLVector4Logical mask;