summaryrefslogtreecommitdiff
path: root/indra/llappearance
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2024-12-18 12:00:11 -0800
committerGitHub <noreply@github.com>2024-12-18 14:00:11 -0600
commit7aca014ebc8c51aa07109eaf7dc77cbfee81c742 (patch)
treee1dbf2aca0b4ffd7e1c66c057415b9082495d60f /indra/llappearance
parenteaa4d07c611d5487e79d94b037465d490bfded5b (diff)
#3305 Don't crash on invalid texture index in getTEWearableType (#3306)
Diffstat (limited to 'indra/llappearance')
-rw-r--r--indra/llappearance/llavatarappearancedefines.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/indra/llappearance/llavatarappearancedefines.cpp b/indra/llappearance/llavatarappearancedefines.cpp
index 5f98f2c8c1..47798844bc 100644
--- a/indra/llappearance/llavatarappearancedefines.cpp
+++ b/indra/llappearance/llavatarappearancedefines.cpp
@@ -300,7 +300,8 @@ EBakedTextureIndex LLAvatarAppearanceDictionary::findBakedByImageName(std::strin
LLWearableType::EType LLAvatarAppearanceDictionary::getTEWearableType(ETextureIndex index ) const
{
- return getTexture(index)->mWearableType;
+ auto* tex = getTexture(index);
+ return tex ? tex->mWearableType : LLWearableType::WT_INVALID;
}
// static