From 7aca014ebc8c51aa07109eaf7dc77cbfee81c742 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Wed, 18 Dec 2024 12:00:11 -0800 Subject: #3305 Don't crash on invalid texture index in getTEWearableType (#3306) --- indra/llappearance/llavatarappearancedefines.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra') 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 -- cgit v1.2.3