From 4522f33d2bad2cc0f67e10a0b0ad3cc7c1b43fbd Mon Sep 17 00:00:00 2001 From: Dave Parks <davep@lindenlab.com> Date: Mon, 10 Jun 2024 16:57:31 -0500 Subject: #1677 Add GLTF extensions serialization and support for KHR_materials_unlit (#1686) --- indra/llmath/llvolumeoctree.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/llmath') diff --git a/indra/llmath/llvolumeoctree.cpp b/indra/llmath/llvolumeoctree.cpp index 7a4d313fb1..faa169e295 100644 --- a/indra/llmath/llvolumeoctree.cpp +++ b/indra/llmath/llvolumeoctree.cpp @@ -151,7 +151,7 @@ void LLOctreeTriangleRayIntersect::visit(const LLOctreeNode<LLVolumeTriangle, LL U32 idx1 = tri->mIndex[1]; U32 idx2 = tri->mIndex[2]; - if (mTexCoord != NULL) + if (mTexCoord != NULL && mFace->mTexCoords) { LLVector2* tc = (LLVector2*) mFace->mTexCoords; *mTexCoord = ((1.f - a - b) * tc[idx0] + @@ -160,7 +160,7 @@ void LLOctreeTriangleRayIntersect::visit(const LLOctreeNode<LLVolumeTriangle, LL } - if (mNormal != NULL) + if (mNormal != NULL && mFace->mNormals) { LLVector4a* norm = mFace->mNormals; @@ -180,7 +180,7 @@ void LLOctreeTriangleRayIntersect::visit(const LLOctreeNode<LLVolumeTriangle, LL *mNormal = n1; } - if (mTangent != NULL) + if (mTangent != NULL && mFace->mTangents) { LLVector4a* tangents = mFace->mTangents; -- cgit v1.2.3