summaryrefslogtreecommitdiff
path: root/indra/llappearance/llwearable.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llappearance/llwearable.cpp')
-rw-r--r--indra/llappearance/llwearable.cpp8
1 files changed, 7 insertions, 1 deletions
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: "