diff options
Diffstat (limited to 'indra/newview/llface.cpp')
-rwxr-xr-x | indra/newview/llface.cpp | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index 32b510b21a..dc74f4a6ef 100755 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -956,6 +956,10 @@ void LLFace::getPlanarProjectedParams(LLQuaternion* face_rot, LLVector3* face_po const LLVolumeFace& vf = getViewerObject()->getVolume()->getVolumeFace(mTEOffset); const LLVector4a& normal4a = vf.mNormals[0]; const LLVector4a& tangent = vf.mTangents[0]; + if (!&tangent) + { + return; + } LLVector4a binormal4a; binormal4a.setCross3(normal4a, tangent); @@ -1299,15 +1303,15 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, } if (shiny_in_alpha) - { - - GLfloat alpha[4] = { - 0.00f, - 0.25f, - 0.5f, - 0.75f - }; + + static const GLfloat alpha[4] = + { + 0.00f, + 0.25f, + 0.5f, + 0.75f + }; llassert(tep->getShiny() <= 3); color.mV[3] = U8 (alpha[tep->getShiny()] * 255); |