summaryrefslogtreecommitdiff
path: root/indra/llappearance
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2018-06-21 15:49:53 +0100
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2018-06-21 15:49:53 +0100
commit9d7b353cbb5c12cd74559a8f3a7365312f95d4d0 (patch)
treeb35c3e3eb0c9c93cea2c01248a3943d5c1277fa7 /indra/llappearance
parent8abfd8da4fb222382437f4b547567fabc6f75cf8 (diff)
parentdc07de2f4a4c49d1877bf743b6f0d209392f6eb6 (diff)
merge
Diffstat (limited to 'indra/llappearance')
-rw-r--r--indra/llappearance/llwearable.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/indra/llappearance/llwearable.cpp b/indra/llappearance/llwearable.cpp
index 63069adcc8..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;
}
}
@@ -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: "