Skip to content

Commit 8b78252

Browse files
author
Rye
committed
Fix crash from null texture entry during updateTextureVirtualSize
1 parent afa1305 commit 8b78252

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

indra/newview/llvovolume.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -784,8 +784,10 @@ void LLVOVolume::updateTextureVirtualSize(bool forced)
784784
for (S32 i = 0; i < num_faces; i++)
785785
{
786786
LLFace* face = mDrawable->getFace(i);
787-
if (!face) continue;
787+
if (!face || face->mExtents[0].equals3(face->mExtents[1])) continue;
788788
const LLTextureEntry *te = face->getTextureEntry();
789+
if (!te) continue;
790+
789791
LLViewerTexture *imagep = nullptr;
790792
U32 ch_min;
791793
U32 ch_max;
@@ -804,8 +806,7 @@ void LLVOVolume::updateTextureVirtualSize(bool forced)
804806
// Get _a_ non-null texture if possible (usually diffuse/basecolor, but could be something else)
805807
imagep = face->getTexture(ch);
806808
}
807-
if (!imagep || !te ||
808-
face->mExtents[0].equals3(face->mExtents[1]))
809+
if (!imagep)
809810
{
810811
continue;
811812
}

0 commit comments

Comments
 (0)