Skip to content

Commit a88373a

Browse files
Ryemarchcat
authored andcommitted
Fix crash from null texture entry during updateTextureVirtualSize
1 parent c02bade commit a88373a

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
@@ -791,8 +791,10 @@ void LLVOVolume::updateTextureVirtualSize(bool forced)
791791
for (S32 i = 0; i < num_faces; i++)
792792
{
793793
LLFace* face = mDrawable->getFace(i);
794-
if (!face) continue;
794+
if (!face || face->mExtents[0].equals3(face->mExtents[1])) continue;
795795
const LLTextureEntry *te = face->getTextureEntry();
796+
if (!te) continue;
797+
796798
LLViewerTexture *imagep = nullptr;
797799
U32 ch_min;
798800
U32 ch_max;
@@ -811,8 +813,7 @@ void LLVOVolume::updateTextureVirtualSize(bool forced)
811813
// Get _a_ non-null texture if possible (usually diffuse/basecolor, but could be something else)
812814
imagep = face->getTexture(ch);
813815
}
814-
if (!imagep || !te ||
815-
face->mExtents[0].equals3(face->mExtents[1]))
816+
if (!imagep)
816817
{
817818
continue;
818819
}

0 commit comments

Comments
 (0)