From 9e58cb266c1084e21c3d945f9d9fe23bf46bd01e Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 25 May 2018 21:11:54 +0000 Subject: MAINT-8693 Fixed crashes during login if you wear a BOM tattoo layer --- indra/llappearance/llwearable.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'indra/llappearance/llwearable.cpp') diff --git a/indra/llappearance/llwearable.cpp b/indra/llappearance/llwearable.cpp index 63069adcc8..edcfd49bb4 100644 --- a/indra/llappearance/llwearable.cpp +++ b/indra/llappearance/llwearable.cpp @@ -437,7 +437,13 @@ LLWearable::EImportResult LLWearable::importStream( std::istream& input_stream, LL_WARNS() << "Bad Wearable asset: bad texture, #" << i << LL_ENDL; return LLWearable::FAILURE; } - + + if (te >= ETextureIndex::TEX_NUM_INDICES) //createLayers() converts to ETextureIndex + { + LL_WARNS() << "Bad Wearable asset: bad texture index: " << te << LL_ENDL; + return LLWearable::FAILURE; + } + if( !LLUUID::validate( uuid_buffer ) ) { LL_WARNS() << "Bad Wearable asset: bad texture uuid: " -- cgit v1.2.3 From 71fa94b3665b4554470314f481c9f0a35f8e6ef2 Mon Sep 17 00:00:00 2001 From: Anchor Linden Date: Wed, 30 May 2018 05:51:37 +0530 Subject: [MAINT-8693] - fix null check --- indra/llappearance/llwearable.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/llappearance/llwearable.cpp') diff --git a/indra/llappearance/llwearable.cpp b/indra/llappearance/llwearable.cpp index edcfd49bb4..6079913a8e 100644 --- a/indra/llappearance/llwearable.cpp +++ b/indra/llappearance/llwearable.cpp @@ -184,7 +184,7 @@ void LLWearable::createLayers(S32 te, LLAvatarAppearance *avatarp) { LLTexLayerSet *layer_set = NULL; const LLAvatarAppearanceDictionary::TextureEntry *texture_dict = LLAvatarAppearanceDictionary::getInstance()->getTexture((ETextureIndex)te); - if (texture_dict->mIsUsedByBakedTexture) + if (texture_dict && texture_dict->mIsUsedByBakedTexture) { const EBakedTextureIndex baked_index = texture_dict->mBakedTextureIndex; @@ -197,7 +197,7 @@ void LLWearable::createLayers(S32 te, LLAvatarAppearance *avatarp) } else { - LL_ERRS() << "could not find layerset for LTO in wearable!" << LL_ENDL; + LL_WARNS() << "could not find layerset for LTO in wearable!" << LL_ENDL; } } -- cgit v1.2.3