Skip to content

Commit

Permalink
Fix crash from null texture entry during updateTextureVirtualSize
Browse files Browse the repository at this point in the history
  • Loading branch information
RyeMutt authored and marchcat committed Dec 2, 2024
1 parent c02bade commit a88373a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions indra/newview/llvovolume.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -791,8 +791,10 @@ void LLVOVolume::updateTextureVirtualSize(bool forced)
for (S32 i = 0; i < num_faces; i++)
{
LLFace* face = mDrawable->getFace(i);
if (!face) continue;
if (!face || face->mExtents[0].equals3(face->mExtents[1])) continue;
const LLTextureEntry *te = face->getTextureEntry();
if (!te) continue;

LLViewerTexture *imagep = nullptr;
U32 ch_min;
U32 ch_max;
Expand All @@ -811,8 +813,7 @@ void LLVOVolume::updateTextureVirtualSize(bool forced)
// Get _a_ non-null texture if possible (usually diffuse/basecolor, but could be something else)
imagep = face->getTexture(ch);
}
if (!imagep || !te ||
face->mExtents[0].equals3(face->mExtents[1]))
if (!imagep)
{
continue;
}
Expand Down

0 comments on commit a88373a

Please sign in to comment.