#3305 Don't crash on invalid texture index in getTEWearableType (#3306)

master
Dave Parks 2024-12-18 12:00:11 -08:00 committed by GitHub
parent eaa4d07c61
commit 7aca014ebc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -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