From a88373a4fc720785f7508bd999abe62a43f617b7 Mon Sep 17 00:00:00 2001
From: Rye <rye@lindenlab.com>
Date: Sun, 3 Nov 2024 10:37:11 -0500
Subject: Fix crash from null texture entry during updateTextureVirtualSize

---
 indra/newview/llvovolume.cpp | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 3ea91447cc..6514db0814 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -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;
@@ -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;
         }
-- 
cgit v1.2.3